src/internal/types/testdata/fixedbugs/issue57192.go
raw| 1 | // Copyright 2023 The Go Authors. All rights reserved. |
| 2 | // Use of this source code is governed by a BSD-style |
| 3 | // license that can be found in the LICENSE file. |
| 4 | |
| 5 | package p |
| 6 | |
| 7 | type I1[T any] interface { |
| 8 | m1(T) |
| 9 | } |
| 10 | type I2[T any] interface { |
| 11 | I1[T] |
| 12 | m2(T) |
| 13 | } |
| 14 | |
| 15 | var V1 I1[int] |
| 16 | var V2 I2[int] |
| 17 | |
| 18 | func g[T any](I1[T]) {} |
| 19 | func _() { |
| 20 | g(V1) |
| 21 | g(V2) |
| 22 | } |