diff options
Diffstat (limited to 'src/go/types/methodset_test.go')
-rw-r--r-- | src/go/types/methodset_test.go | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/go/types/methodset_test.go b/src/go/types/methodset_test.go index 5b29b2f0fe..73a8442f21 100644 --- a/src/go/types/methodset_test.go +++ b/src/go/types/methodset_test.go @@ -46,12 +46,14 @@ func TestNewMethodSet(t *testing.T) { genericTests := map[string][]method{ // By convention, look up a in the scope of "g" - "type C interface{ f() }; func g[T C](a T){}": {{"f", []int{0}, true}}, - "type C interface{ f() }; func g[T C]() { var a T; _ = a }": {{"f", []int{0}, true}}, - "type C interface{ f() }; func g[T C]() { var a struct{T}; _ = a }": {{"f", []int{0, 0}, true}}, + "type C interface{ f() }; func g[T C](a T){}": {{"f", []int{0}, true}}, + "type C interface{ f() }; func g[T C]() { var a T; _ = a }": {{"f", []int{0}, true}}, - // Issue #45639: We don't allow this anymore. Keep this code in case we - // decide to revisit this decision. + // Issue #43621: We don't allow this anymore. Keep this code in case we + // decide to revisit this decision. + // "type C interface{ f() }; func g[T C]() { var a struct{T}; _ = a }": {{"f", []int{0, 0}, true}}, + + // Issue #45639: We also don't allow this anymore. // "type C interface{ f() }; func g[T C]() { type Y T; var a Y; _ = a }": {}, } |