if sbound != nil {
if !u.unify(typ, sbound) {
if report {
- check.errorf(tpar, 0, "%s does not match %s", tpar, sbound)
+ check.errorf(tpar, _Todo, "%s does not match %s", tpar, sbound)
}
return nil, 0
}
// was given, unification produced the type list [int, []C, *A]. We eliminate the
// remaining type parameters by substituting the type parameters in this type list
// until nothing changes anymore.
- types, index = u.x.types()
+ types, _ = u.x.types()
if debug {
for i, targ := range targs {
assert(targ == nil || types[i] == targ)
--- /dev/null
+// Copyright 2021 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package issue45985
+
+// TODO(rFindley): this error should be on app[int] below.
+func app[S /* ERROR "type S = S does not match" */ interface{ type []T }, T any](s S, e T) S {
+ return append(s, e)
+}
+
+func _() {
+ _ = app[int]
+}