]> Cypherpunks repositories - gostls13.git/commit
cmd/compile/internal/types2: no need to validate substituted instances
authorRobert Findley <rfindley@google.com>
Fri, 13 Aug 2021 19:03:14 +0000 (15:03 -0400)
committerRobert Findley <rfindley@google.com>
Wed, 18 Aug 2021 22:16:08 +0000 (22:16 +0000)
commit805d38a3529918a708875b068ccee46a7edcead0
treeb72068ba0672bef3a2c0397b023cfdd054525a48
parentc2bd9ee2dbec88d4fd1b21aefa21cd988d01b880
cmd/compile/internal/types2: no need to validate substituted instances

When substituting a type instance, we rely on the instance being
expanded and do not call validType, so there is need to depend on
subster.pos for error reporting or to use subst.check for creating the
new Named type. Errors will be reported for the unsubstituted instance.

This is a superficial change, but justifies some later simplification
where we don't have access to pos or check.

Change-Id: I1f3f12aa245d821512c6242ad829c940f20afae4
Reviewed-on: https://go-review.googlesource.com/c/go/+/342150
Trust: Robert Findley <rfindley@google.com>
Run-TryBot: Robert Findley <rfindley@google.com>
Reviewed-by: Robert Griesemer <gri@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
src/cmd/compile/internal/types2/subst.go