aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/compile/internal/types2/issues_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/cmd/compile/internal/types2/issues_test.go')
-rw-r--r--src/cmd/compile/internal/types2/issues_test.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/cmd/compile/internal/types2/issues_test.go b/src/cmd/compile/internal/types2/issues_test.go
index e716a48038..9890b79323 100644
--- a/src/cmd/compile/internal/types2/issues_test.go
+++ b/src/cmd/compile/internal/types2/issues_test.go
@@ -321,7 +321,7 @@ func TestIssue25627(t *testing.T) {
}
}
- syntax.Walk(f, func(n syntax.Node) bool {
+ syntax.Crawl(f, func(n syntax.Node) bool {
if decl, _ := n.(*syntax.TypeDecl); decl != nil {
if tv, ok := info.Types[decl.Type]; ok && decl.Name.Value == "T" {
want := strings.Count(src, ";") + 1
@@ -402,8 +402,9 @@ func TestIssue28282(t *testing.T) {
// create type interface { error }
et := Universe.Lookup("error").Type()
it := NewInterfaceType(nil, []Type{et})
- it.Complete()
// verify that after completing the interface, the embedded method remains unchanged
+ // (interfaces are "completed" lazily now, so the completion happens implicitly when
+ // accessing Method(0))
want := et.Underlying().(*Interface).Method(0)
got := it.Method(0)
if got != want {