From: Robert Griesemer Date: Wed, 17 Mar 2021 23:49:02 +0000 (-0700) Subject: go/types: add test case for issue #45096 X-Git-Tag: go1.17beta1~1076 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=2583c1b4df;p=gostls13.git go/types: add test case for issue #45096 This verifies that issue #45096 is not an issue for go/types. Updates #45096. Change-Id: I4e987b5d4928f0c864d0d2c0379149443beb4d5c Reviewed-on: https://go-review.googlesource.com/c/go/+/302754 Trust: Robert Griesemer Run-TryBot: Robert Griesemer Reviewed-by: Robert Findley --- diff --git a/src/go/types/api_test.go b/src/go/types/api_test.go index 0226a857bd..427aa04e47 100644 --- a/src/go/types/api_test.go +++ b/src/go/types/api_test.go @@ -341,6 +341,9 @@ func TestTypesInfo(t *testing.T) { // instantiated types must be sanitized {genericPkg + `g0; type t[P any] int; var x struct{ f t[int] }; var _ = x.f`, `x.f`, `generic_g0.t[int]`}, + + // issue 45096 + {genericPkg + `issue45096; func _[T interface{ type int8, int16, int32 }](x T) { _ = x < 0 }`, `0`, `T₁`}, } for _, test := range tests {