Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmd/compile: internal compiler error: unexpected Interface for <nil> #22043

Closed
eliasnaur opened this issue Sep 26, 2017 · 2 comments
Closed

cmd/compile: internal compiler error: unexpected Interface for <nil> #22043

eliasnaur opened this issue Sep 26, 2017 · 2 comments
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@eliasnaur
Copy link
Contributor

Please answer these questions before submitting your issue. Thanks!

What version of Go are you using (go version)?

Playground

Does this issue reproduce with the latest release?

Yes

What did you do?

Ran https://play.golang.org/p/0Cq3cm9-bo

What did you expect to see?

main.go:4:13: undefined: G

What did you see instead?

tmp/sandbox815323628/main.go:4:13: undefined: G
tmp/sandbox815323628/main.go:6:5: internal compiler error: unexpected Interface for <nil>

goroutine 1 [running]:
runtime/debug.Stack(0x0, 0x0, 0x0)
	/usr/local/go/src/runtime/debug/stack.go:24 +0xa7
cmd/compile/internal/gc.Fatalf(0xb654a1, 0x1b, 0xc4202fc0e8, 0x1, 0x1)
	/usr/local/go/src/cmd/compile/internal/gc/subr.go:181 +0x230
cmd/compile/internal/gc.Val.Interface(0x0, 0x0, 0xc4202fc2e8, 0xc4202fc318)
	/usr/local/go/src/cmd/compile/internal/gc/const.go:99 +0x2df
cmd/compile/internal/gc.checkDupExprCases(0xc4202cee80, 0xc42000c548, 0x1, 0x1)
	/usr/local/go/src/cmd/compile/internal/gc/swt.go:628 +0x5ad
cmd/compile/internal/gc.typecheckswitch(0xc4202ceb80)
	/usr/local/go/src/cmd/compile/internal/gc/swt.go:210 +0x13a8
cmd/compile/internal/gc.typecheck1(0xc4202ceb80, 0x1, 0xc4202cea80)
	/usr/local/go/src/cmd/compile/internal/gc/typecheck.go:2157 +0xc871
cmd/compile/internal/gc.typecheck(0xc4202ceb80, 0x1, 0xc4202cea80)
	/usr/local/go/src/cmd/compile/internal/gc/typecheck.go:201 +0x764
cmd/compile/internal/gc.typecheckslice(0xc4202c7b40, 0x3, 0x4, 0x1)
	/usr/local/go/src/cmd/compile/internal/gc/typecheck.go:55 +0x54
cmd/compile/internal/gc.Main(0xb73f98)
	/usr/local/go/src/cmd/compile/internal/gc/main.go:480 +0x1fd0
main.main()
	/usr/local/go/src/cmd/compile/main.go:49 +0x95
@ianlancetaylor ianlancetaylor added this to the Go1.10 milestone Sep 26, 2017
@ianlancetaylor ianlancetaylor added the NeedsFix The path to resolution is known, but the work has not been done. label Sep 26, 2017
@mvdan
Copy link
Member

mvdan commented Sep 26, 2017

The good news is that this is already fixed: #21988

The bad news is that it's a regression in 1.9 not deemed important enough for a 1.9.x. And I would imagine the playground has to run stable, not tip.

@mdempsky
Copy link
Member

Duplicate of #21988.

@golang golang locked and limited conversation to collaborators Sep 26, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Projects
None yet
Development

No branches or pull requests

5 participants