You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The compiler produces the following error message:
./main.go:17:3: cannot use x (type structy) as type iface in argument to h:
structy does not implement iface (wrong type for hello method)
have hello(string)
want hello(string) string
Whereas, go/types produces: cannot use x (variable of type structy) as iface value in argument to h: wrong type for method hello
We should add more detail to the go/types error message.
The text was updated successfully, but these errors were encountered:
Given this program:
The compiler produces the following error message:
Whereas, go/types produces:
cannot use x (variable of type structy) as iface value in argument to h: wrong type for method hello
We should add more detail to the go/types error message.
The text was updated successfully, but these errors were encountered: