tinygo icon indicating copy to clipboard operation
tinygo copied to clipboard

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

Open fxamacker opened this issue 1 year ago • 1 comments

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()) 

fxamacker avatar Sep 07 '24 23:09 fxamacker