]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: fix creation of named generic types (setting of t.nod)
authorDan Scales <danscales@google.com>
Wed, 10 Mar 2021 23:25:21 +0000 (15:25 -0800)
committerDan Scales <danscales@google.com>
Tue, 30 Mar 2021 04:48:27 +0000 (04:48 +0000)
commit032ef4bbfc5b976085c561eb4a134b780625f410
treef227b8a1a6b63259d31bb3e4bd3cfae7e5080eaf
parentbb2fc21c3b818c45fad23fdf5f8bd83bbc074dce
cmd/compile: fix creation of named generic types (setting of t.nod)

The correct setting of t.nod is needed when exporting types. Make sure
we create instantiated named types correctly so t.nod is set.

New test file interfacearg.go that tests this (by instantiating a type
with an interface). Also has tests for various kinds of method
expressions.

Change-Id: Ia7fd9debd495336b73788af9e35d72331bb7d2b5
Reviewed-on: https://go-review.googlesource.com/c/go/+/305730
Run-TryBot: Dan Scales <danscales@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Trust: Dan Scales <danscales@google.com>
Trust: Robert Griesemer <gri@golang.org>
Reviewed-by: Robert Griesemer <gri@golang.org>
src/cmd/compile/internal/noder/stencil.go
src/cmd/compile/internal/noder/types.go
src/cmd/compile/internal/types/type.go
test/typeparam/interfacearg.go [new file with mode: 0644]