File tree 3 files changed +8
-0
lines changed
cmd/compile/internal/types2
internal/types/testdata/fixedbugs
3 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -131,6 +131,7 @@ var op2str2 = [...]string{
131
131
// If typ is a type parameter, underIs returns the result of typ.underIs(f).
132
132
// Otherwise, underIs returns the result of f(under(typ)).
133
133
func underIs (typ Type , f func (Type ) bool ) bool {
134
+ typ = Unalias (typ )
134
135
if tpar , _ := typ .(* TypeParam ); tpar != nil {
135
136
return tpar .underIs (f )
136
137
}
Original file line number Diff line number Diff line change @@ -117,6 +117,7 @@ var op2str2 = [...]string{
117
117
// If typ is a type parameter, underIs returns the result of typ.underIs(f).
118
118
// Otherwise, underIs returns the result of f(under(typ)).
119
119
func underIs (typ Type , f func (Type ) bool ) bool {
120
+ typ = Unalias (typ )
120
121
if tpar , _ := typ .(* TypeParam ); tpar != nil {
121
122
return tpar .underIs (f )
122
123
}
Original file line number Diff line number Diff line change @@ -20,3 +20,9 @@ func _[P string]() {
20
20
var s A
21
21
copy (t , s ) // don't report an error for s
22
22
}
23
+
24
+ func _ [P map [int ]int ]() {
25
+ type A = P
26
+ var m A
27
+ clear (m ) // don't report an error for m
28
+ }
You can’t perform that action at this time.
0 commit comments