Skip to content

Commit

Permalink
go/types: add test case for issue #45096
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
griesemer committed Mar 18, 2021
1 parent f38b642 commit 2583c1b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/go/types/api_test.go
Expand Up @@ -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 {
Expand Down

0 comments on commit 2583c1b

Please sign in to comment.