]> Cypherpunks repositories - gostls13.git/commitdiff
go/types: add test case for issue #45096
authorRobert Griesemer <gri@golang.org>
Wed, 17 Mar 2021 23:49:02 +0000 (16:49 -0700)
committerRobert Griesemer <gri@golang.org>
Thu, 18 Mar 2021 00:08:55 +0000 (00:08 +0000)
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 <gri@golang.org>
Run-TryBot: Robert Griesemer <gri@golang.org>
Reviewed-by: Robert Findley <rfindley@google.com>
src/go/types/api_test.go

index 0226a857bd7e8f3253aa3f145cf61f6dc637c8c7..427aa04e47bf85adf2c8de6cc2d59224091b231d 100644 (file)
@@ -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 {