5 ms·
It's not wrong, https://go.dev/ref/spec#Assignability https://go.dev/ref/spec#Assignability: > A value x of type V is assignable to a variable of type T ("
by the_gipsy 3y ago
It's not wrong, https://go.dev/ref/spec#Assignability https://go.dev/ref/spec#Assignability:
> A value x of type V is assignable to a variable of type T ("x is assignable to T") if
> ...
> T is an interface type, but not a type parameter, and x implements[1] T
[1]: https://go.dev/ref/spec#Implementing_an_interface https://go.dev/ref/spec#Implementing_an_interface:
> A type T implements an interface I if:
> ...
> T is an interface and the type set of T is a subset of the type set of I