Source file src/internal/types/testdata/fixedbugs/issue60747.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 f[P any](P) P { panic(0) } 8 9 var v func(string) int = f // ERROR "inferred type func(string) string for func(P) P does not match type func(string) int of v" 10 11 func _() func(string) int { 12 return f // ERROR "inferred type func(string) string for func(P) P does not match type func(string) int of result variable" 13 } 14