Change-Id: Ifc0d6e999777513498f070c5bc2fb4640d38c671
Reviewed-on: https://go-review.googlesource.com/c/go/+/712460
Reviewed-by: Robert Griesemer <gri@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Robert Griesemer <gri@google.com>
Reviewed-by: Mark Freeman <markfreeman@google.com>
for a := a0; a != nil; a, _ = t.(*Alias) {
t = a.fromRHS
}
-
// It's fine to memoize nil types since it's the zero value for actual.
// It accomplishes nothing.
a0.actual = t
case *Alias:
// Methods on generic aliases are not permitted.
// Only report an error if the alias type is valid.
- if isValid(unalias(t)) {
+ if isValid(t) {
check.errorf(rbase, InvalidRecv, "cannot define new methods on generic alias type %s", t)
}
// Ok to continue but do not set basetype in this case so that
for a := a0; a != nil; a, _ = t.(*Alias) {
t = a.fromRHS
}
-
// It's fine to memoize nil types since it's the zero value for actual.
// It accomplishes nothing.
a0.actual = t
case *Alias:
// Methods on generic aliases are not permitted.
// Only report an error if the alias type is valid.
- if isValid(unalias(t)) {
+ if isValid(t) {
check.errorf(rbase, InvalidRecv, "cannot define new methods on generic alias type %s", t)
}
// Ok to continue but do not set basetype in this case so that