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
func F(middleware interface{}) {
switch middleware {
case tigertonic.JSONLogged:
[...]
and get a compiler error like this:
$ go build
# [...]/server
./middleware.go:69: invalid operation: autotmp_0210 == "github.com/rcrowley/go-tigertonic".JSONLogged (operator == not defined on func)
./middleware.go:73: invalid operation: autotmp_0210 == "github.com/rcrowley/go-tigertonic".Logged (operator == not defined on func)
I'm guessing auto-generated variable names aren't meant to be exposed outside the compiler?
The text was updated successfully, but these errors were encountered:
Can you please provide a small, complete, standalone example? That will take less total time than us guessing to try to create a complete example from your code fragment. Thanks.
go version devel +aadd84e Sat Jul 18 01:35:25 2015 +0000 linux/amd64
package main
func f() {}
func s(x interface{}) {
switch x {
case f:
}
}
func main() {
s(f)
}
./t.go:7: invalid operation: autotmp_0000 == f (operator == not defined on func)
ianlancetaylor
changed the title
cmd/go: autotmp_NNNN variable name in compiler error output
cmd/compile: autotmp_NNNN variable name in compiler error output
Jul 18, 2015
Write code like this:
and get a compiler error like this:
I'm guessing auto-generated variable names aren't meant to be exposed outside the compiler?
The text was updated successfully, but these errors were encountered: