Source file src/internal/types/testdata/fixedbugs/issue61685.go
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 func _[T any](x any) { 8 f /* ERROR "T (type I[T]) does not satisfy I[T] (wrong type for method m)" */ (x.(I[T])) 9 } 10 11 func f[T I[T]](T) {} 12 13 type I[T any] interface { 14 m(T) 15 } 16