aboutsummaryrefslogtreecommitdiff
path: root/src/go/types/api_test.go
diff options
context:
space:
mode:
authorRobert Griesemer <gri@golang.org>2021-03-17 16:49:02 -0700
committerRobert Griesemer <gri@golang.org>2021-03-18 00:08:55 +0000
commit2583c1b4df979eae16fab6527275030a630da42b (patch)
tree50d960addb0ea94f83d89e65009ef17592ae1d4b /src/go/types/api_test.go
parentf38b6428a2d1beae784a9402368e4d7f9c7cd8c5 (diff)
downloadgo-2583c1b4df979eae16fab6527275030a630da42b.tar.gz
go-2583c1b4df979eae16fab6527275030a630da42b.zip
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 <gri@golang.org> Run-TryBot: Robert Griesemer <gri@golang.org> Reviewed-by: Robert Findley <rfindley@google.com>
Diffstat (limited to 'src/go/types/api_test.go')
-rw-r--r--src/go/types/api_test.go3
1 files changed, 3 insertions, 0 deletions
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 {