aboutsummaryrefslogtreecommitdiff
path: root/test/run.go
diff options
context:
space:
mode:
authorDan Scales <danscales@google.com>2021-07-12 19:34:15 -0700
committerDan Scales <danscales@google.com>2021-07-23 21:16:54 +0000
commit02c01725002a73739cefbc9fcf2575469be6da13 (patch)
tree630a1294f5b72f5a3b06b6697cff72f628739dfc /test/run.go
parent12866bd8ea13e43bc5995f58cdeb67ffd64a1c8c (diff)
downloadgo-02c01725002a73739cefbc9fcf2575469be6da13.tar.gz
go-02c01725002a73739cefbc9fcf2575469be6da13.zip
[dev.typeparams] cmd/compile: add dictionary entries for itab conversion
This fix the case where a type param or derived type is converted to a non-empty interface. Previously, we were converting to an empty interface and then using DOTTYPE to convert to the correct non-empty interface. In that case, we can get the needed itab directly from the dictionary. This is needed for correctness from shapes, if the destination interface is parameterized, else we will incorrectly convert to the shape version of the interface. Creating/writing an itab can involve generating wrappers for a bunch of methods, which may use dictionaries. So, all the dictionaries/instantiations are being generated on the fly and have recursive relationships, it is simplest to finish creating/writing the itabs at the end of the stenciling phase. So, we create a list of the dictionaries which need to be completed by writing out their itab entries. The existing tests ordered.go, ifaceconv.go, and issue44688.go make use of this optimization. Got itab conversions for bound calls working, except for 13.go. Also, want to get rid of the concretify, but I think we need more info on the Bound from types2. Change-Id: If552958a7b8a435500d6cc42c401572c367b30d1 Reviewed-on: https://go-review.googlesource.com/c/go/+/336993 Trust: Dan Scales <danscales@google.com> Run-TryBot: Dan Scales <danscales@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Keith Randall <khr@golang.org>
Diffstat (limited to 'test/run.go')
-rw-r--r--test/run.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/test/run.go b/test/run.go
index 23eebcee2e..5624654fec 100644
--- a/test/run.go
+++ b/test/run.go
@@ -2182,7 +2182,8 @@ var g3Failures = setOf(
"typeparam/nested.go", // -G=3 doesn't support function-local types with generics
- "typeparam/mdempsky/4.go", // -G=3 can't export functions with labeled breaks in loops
+ "typeparam/mdempsky/4.go", // -G=3 can't export functions with labeled breaks in loops
+ "typeparam/mdempsky/13.go", // problem with interface as as a type arg.
"typeparam/cons.go", // causes an unreachable method
"typeparam/issue44688.go", // interface conversion fails due to missing method