]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: in typ0(), load base type before checking s.Def
authorDan Scales <danscales@google.com>
Fri, 7 Jan 2022 20:22:24 +0000 (12:22 -0800)
committerDan Scales <danscales@google.com>
Tue, 11 Jan 2022 21:56:11 +0000 (21:56 +0000)
commit13c912d19252b9225fa96b9a5557575bbaffb570
tree0142a4bb131ae6621367f97080164495396763ca
parentad7eae21d5e75a0b1fe89db5f299490d6273c4cf
cmd/compile: in typ0(), load base type before checking s.Def

The loading of the base type in typ0() may cause s.Def to be defined for
the instantiated type, so load the base type before checking s.Def.

Fixes #50486

Change-Id: Ic039bc8f774dda534f4ccd1f920220b7a10dede6
Reviewed-on: https://go-review.googlesource.com/c/go/+/377094
Trust: Dan Scales <danscales@google.com>
Run-TryBot: Dan Scales <danscales@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
src/cmd/compile/internal/noder/types.go
test/typeparam/issue50486.dir/goerror_fp.go [new file with mode: 0644]
test/typeparam/issue50486.dir/main.go [new file with mode: 0644]
test/typeparam/issue50486.go [new file with mode: 0644]