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
Test program:
package main
type cplx complex64
func (c cplx) Foo() {}
func main() {
var c cplx
c.Foo()
}
Compiler output:
test.go:5: invalid receiver type cplx
test.go:9: c.Foo undefined (type cplx has no field or method Foo)
The same thing happens with complex128.
I notice in gc/align.c, there's a commented out line that would make
issimple[TCOMPLEX64] and issimple[TCOMPLEX128] true. I'm pretty sure uncommenting that
line would fix this problem, but presumably it was commented out for a reason, so I'll
leave this to someone who knows more about it.