So, it is really a bug. I will report it. On Thursday, June 18, 2020 at 8:17:22 AM UTC-4, Harald Weidner wrote: > > Hello, > > > But the following code also fails to compile, bug? > > > > package main > > > > type Int interface { > > type int > > } > > > > func Foo(type T Int) ([]T) {} // undefined: MyInt > > > > func main() { > > type MyInt int > > Foo([]MyInt(nil)) > > } > > It compiles if you move "type MyInt int" out of the func main scope. See > https://go2goplay.golang.org/p/_sWi72-0rD1 > > Harald >
-- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/937ace02-47b4-473b-8fc6-1107e1192d74o%40googlegroups.com.