-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Closed
Closed
Copy link
Labels
FrozenDueToAgeNeedsFixThe path to resolution is known, but the work has not been done.The path to resolution is known, but the work has not been done.
Milestone
Description
I apologize for all the bug reports, but I'm hitting another internal compiler error.
$ go.tip version
go version devel go1.18-d9244f8b64 Fri Sep 3 21:31:30 2021 +0000 linux/amd64
$ go.tip build
# github.com/go-json-experiment/json
panic: interface conversion: ir.Node is *ir.typeNode, not *ir.Name
goroutine 1 [running]:
cmd/compile/internal/ir.(*Decl).editChildren(0xc001068930, 0xe65358)
/usr/local/go.tip/src/cmd/compile/internal/ir/node_gen.go:462 +0x87
cmd/compile/internal/ir.EditChildren(...)
/usr/local/go.tip/src/cmd/compile/internal/ir/visit.go:185
cmd/compile/internal/noder.(*subster).node.func1({0xe65358, 0xc000d2e6c0})
/usr/local/go.tip/src/cmd/compile/internal/noder/stencil.go:942 +0x486
cmd/compile/internal/noder.(*subster).node(0xc000feba80, {0xe65358, 0xc000d2e6c0})
/usr/local/go.tip/src/cmd/compile/internal/noder/stencil.go:1248 +0xa5
cmd/compile/internal/noder.(*subster).list(0xc00000ee98, {0xc0000b0f00, 0x9, 0xc000072640})
/usr/local/go.tip/src/cmd/compile/internal/noder/stencil.go:1362 +0x8e
cmd/compile/internal/noder.(*irgen).genericSubst(0xc0004a8700, 0xc001063ae0, 0xc0005d4270, {0xc00106a0a0, 0x2, 0x2}, 0x1, 0xc00012d600)
/usr/local/go.tip/src/cmd/compile/internal/noder/stencil.go:726 +0xce6
cmd/compile/internal/noder.(*irgen).getInstantiation(0xc0004a8700, 0xc0005d4270, {0xc00056c330, 0x2, 0x2}, 0x30)
/usr/local/go.tip/src/cmd/compile/internal/noder/stencil.go:608 +0x33d
cmd/compile/internal/noder.(*irgen).instantiateMethods(0xc0004a8700)
/usr/local/go.tip/src/cmd/compile/internal/noder/stencil.go:511 +0x248
cmd/compile/internal/noder.(*irgen).stencil(0xc0004a8700)
/usr/local/go.tip/src/cmd/compile/internal/noder/stencil.go:50 +0x9b
cmd/compile/internal/noder.(*irgen).generate(0xc0004a8700, {0xc000069aa0, 0xc, 0x0})
/usr/local/go.tip/src/cmd/compile/internal/noder/irgen.go:304 +0x359
cmd/compile/internal/noder.check2({0xc000069aa0, 0xc, 0xc})
/usr/local/go.tip/src/cmd/compile/internal/noder/irgen.go:92 +0x175
cmd/compile/internal/noder.LoadPackage({0xc000001ae0, 0xc, 0x0})
/usr/local/go.tip/src/cmd/compile/internal/noder/noder.go:90 +0x335
cmd/compile/internal/gc.Main(0xd1dcb0)
/usr/local/go.tip/src/cmd/compile/internal/gc/main.go:190 +0xaf3
main.main()
/usr/local/go.tip/src/cmd/compile/main.go:55 +0xdd
Reproduction:
$ git clone https://github.com/go-json-experiment/json.git
$ cd json
$ git checkout origin/generics-bug3
$ go build
Based on @mdempsky's comment in #48016 (comment), I tried building this with GOEXPERIMENT=unified
and it seems to work.
The relevant change that seems to cause an ICE is the presence of a local type alias:
func (a *arshalers[Options, Coder]) lookup(fnc func(Options, *Coder, addressableValue) error, t reflect.Type) func(Options, *Coder, addressableValue) error {
type F = func(Options, *Coder, addressableValue) error
...
}
Metadata
Metadata
Assignees
Labels
FrozenDueToAgeNeedsFixThe path to resolution is known, but the work has not been done.The path to resolution is known, but the work has not been done.