3 // Copyright 2022 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.
7 // The Go 1.18 frontend failed to disambiguate instantiations of
8 // different, locally defined generic types with the same name.
10 // The unified frontend also exposed the scope-disambiguation mangling
11 // to end users in reflect data.
19 func one() any { type T[_ any] int; return T[int](0) }
20 func two() any { type T[_ any] int; return T[int](0) }
25 // p and q have different dynamic types; this comparison should
28 panic("bad type identity")
31 for _, x := range []any{p, q} {
32 // The names here should not contain "·1" or "·2".
33 if name := reflect.TypeOf(x).String(); name != "main.T[int]" {