]> Cypherpunks repositories - gostls13.git/commit
[dev.typeparams] Fix the types of the OFUNCINST nodes in noder2
authorDan Scales <danscales@google.com>
Wed, 21 Jul 2021 02:18:15 +0000 (19:18 -0700)
committerDan Scales <danscales@google.com>
Wed, 21 Jul 2021 21:52:05 +0000 (21:52 +0000)
commit4e6836e82c981af7c041474f139b3de03906c3b0
treed6444e7be65b0ccc4bd7b0e404308a197be42129
parentdcc8350ad304714824cc8e5b8a00105dabb61c54
[dev.typeparams] Fix the types of the OFUNCINST nodes in noder2

types2 doesn't actually give us the type of an instantiated
function/method after the type args have been applied. So, do a
substitution at the point that we create the OFUNCINST nodes.

We also needed to add in translation of the typeparams of a function
signature in the type substituter. If the type params of the function
become all concrete after the substitution, then we just drop them,
since the whole signature must now be concrete.

Change-Id: I6116d2aa248be6924ec9e6d8516678db45aa65c4
Reviewed-on: https://go-review.googlesource.com/c/go/+/336370
Run-TryBot: Dan Scales <danscales@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Trust: Dan Scales <danscales@google.com>
Reviewed-by: Keith Randall <khr@golang.org>
src/cmd/compile/internal/noder/expr.go
src/cmd/compile/internal/typecheck/subr.go