Skip to content

Commit 778ce7b

Browse files
ianlancetaylorgopherbot
authored andcommitted
typeparams: don't complain that Go 1.17 doesn't support iterators
This fixes a test that broke when iterator methods were added to go/types in CL 575455. Fixes golang/go#69000 Change-Id: I2c60bbaa3a8c1f059d6d335ec40962e1215375b8 Reviewed-on: https://go-review.googlesource.com/c/exp/+/607895 Reviewed-by: Robert Findley <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]> Auto-Submit: Ian Lance Taylor <[email protected]> Reviewed-by: Alan Donovan <[email protected]>
1 parent 0cdaa3a commit 778ce7b

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

typeparams/typeparams_test.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import (
1414
"go/parser"
1515
"go/token"
1616
"go/types"
17+
"strings"
1718
"testing"
1819
)
1920

@@ -35,6 +36,12 @@ func TestAPIConsistency(t *testing.T) {
3536
delete(api118, name)
3637
}
3738
for name, api := range api118 {
39+
// Go 1.23 has iterator methods that return Seq.
40+
// These methods can't be supported at 1.17.
41+
if strings.Contains(api, "Seq") && api117[name] == "" {
42+
continue
43+
}
44+
3845
if api != api117[name] {
3946
t.Errorf("%q: got %s at 1.18+, but %s at 1.17", name, api, api117[name])
4047
}

0 commit comments

Comments
 (0)