I6 interface{ I5 }
// maps
- M0 map[M0 /* ERROR incomparable map key */ ]M0
+ M0 map[M0 /* ERROR invalid map key */ ]M0
// channels
C0 chan C0
i0 /* ERROR cycle */ interface{ i0 }
// maps
- m0 map[m0 /* ERROR incomparable map key */ ]m0
+ m0 map[m0 /* ERROR invalid map key */ ]m0
// channels
c0 chan c0
// test cases for issue 6667
-type A [10]map[A /* ERROR incomparable map key */ ]bool
+type A [10]map[A /* ERROR invalid map key */ ]bool
type S struct {
- m map[S /* ERROR incomparable map key */ ]bool
+ m map[S /* ERROR invalid map key */ ]bool
}
// test cases for issue 7236
var _ = new /* ERROR cannot use generic function new */
var _ *int = new[int]()
-func _[T any](map[T /* ERROR incomparable map key type T \(missing comparable constraint\) */]int) {} // w/o constraint we don't know if T is comparable
+func _[T any](map[T /* ERROR invalid map key type T \(missing comparable constraint\) */]int) {} // w/o constraint we don't know if T is comparable
func f1[T1 any](struct{T1 /* ERROR cannot be a .* type parameter */ }) int { panic(0) }
var _ = f1[int](struct{T1}{})
if isTypeParam(typ.key) {
why = " (missing comparable constraint)"
}
- check.errorf(e.Key, _IncomparableMapKey, "incomparable map key type %s%s", typ.key, why)
+ check.errorf(e.Key, _IncomparableMapKey, "invalid map key type %s%s", typ.key, why)
}
}).describef(e.Key, "check map key %s", typ.key)