Skip to content

return value of Type.String() for function type doesn't match Go's reflect pkg #4458

Open
@fxamacker

Description

@fxamacker

Return value of Type.String() for function type doesn't match equivalent call using Go's reflect package.

The code snippet below produces:

  • tinygo: func
  • go1.22: func(int, string) (bool, error)
f := func(int, string) (bool, error) {
	return false, nil
}
rt := reflect.TypeOf(f)
fmt.Println(rt.String()) 

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingreflectionNeeds further work on reflection

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions