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
{{ message }}
Repository navigation
cmd/compile: internal compiler error: method receiver, when missing function type on anonymous function #22389
$ go version
go version go1.9 linux/amd64
$ go build test.go
# command-line-arguments
./test.go:16:14: f is not a type
./test.go:16:8: internal compiler error: method receiver
goroutine 1 [running]:
runtime/debug.Stack(0x0, 0x0, 0x0)
/usr/local/go/src/runtime/debug/stack.go:24 +0xa7
cmd/compile/internal/gc.Fatalf(0xb5dd44, 0xf, 0x0, 0x0, 0x0)
/usr/local/go/src/cmd/compile/internal/gc/subr.go:181 +0x230
cmd/compile/internal/gc.typecheck1(0xc4202f3800, 0x1, 0xc4202f3680)
/usr/local/go/src/cmd/compile/internal/gc/typecheck.go:1285 +0x4a5d
cmd/compile/internal/gc.typecheck(0xc4202f3800, 0x1, 0xc4202f3680)
/usr/local/go/src/cmd/compile/internal/gc/typecheck.go:201 +0x782
cmd/compile/internal/gc.typecheckslice(0xc420046d30, 0x2, 0x2, 0x1)
/usr/local/go/src/cmd/compile/internal/gc/typecheck.go:55 +0x54
cmd/compile/internal/gc.Main(0xb73f90)
/usr/local/go/src/cmd/compile/internal/gc/main.go:480 +0x1fd0
main.main()
/usr/local/go/src/cmd/compile/main.go:49 +0x95
$ gotip version
go version devel +378de1ae43 Tue Oct 17 04:03:16 2017 +0000 linux/amd64
$ gotip build test.go
# command-line-arguments
./test.go:16:14: f is not a type
Activity
ALTree commentedon Oct 23, 2017
Appears to be already fixed on tip
odeke-em commentedon Oct 31, 2017
@mdempsky your CL https://go-review.googlesource.com/c/go/+/70850 and commit f3d4ff7#diff-4e8331dc0915d867dc05240b929434de fixed this issue. I'll mail a CL locking in a test for this issue and then we can close this issue.
gopherbot commentedon Oct 31, 2017
Change https://golang.org/cl/74630 mentions this issue:
cmd/compile: test for omitted ICE diagnostics after normal messagescmd/compile: test for omitted ICE diagnostics after normal messages
odeke-em commentedon Nov 6, 2017
Alright, closed with CL https://go-review.googlesource.com/c/go/+/74630 and commit 0ba4eba. Thanks for the report @anisus and for tracking it @ALTree and @mdempsky for the actual fix!