1 // -gotypesalias=1 2 3 // Copyright 2024 The Go Authors. All rights reserved. 4 // Use of this source code is governed by a BSD-style 5 // license that can be found in the LICENSE file. 6 7 package p 8 9 func f[P any](x P) P { return x } 10 11 func _() { 12 type A = int 13 var a A 14 b := f(a) // type of b is A 15 // error should report type of b as A, not int 16 _ = b /* ERROR "mismatched types A and untyped string" */ + "foo" 17 } 18