// maketl makes a term list from a string of the term list.
func maketl(s string) termlist {
- s = strings.Replace(s, " ", "", -1)
+ s = strings.ReplaceAll(s, " ", "")
names := strings.Split(s, "∪")
r := make(termlist, len(names))
for i, n := range names {
return r
}
-func TestTermlistTop(t *testing.T) {
+func TestTermlistAll(t *testing.T) {
if !allTermlist.isAll() {
t.Errorf("allTermlist is not the set of all types")
}
// arrayPtrDeref returns A if typ is of the form *A and A is an array;
// otherwise it returns typ.
-//
func arrayPtrDeref(typ Type) Type {
if p, ok := typ.(*Pointer); ok {
if a := asArray(p.base); a != nil {
// maketl makes a term list from a string of the term list.
func maketl(s string) termlist {
- s = strings.Replace(s, " ", "", -1)
+ s = strings.ReplaceAll(s, " ", "")
names := strings.Split(s, "∪")
r := make(termlist, len(names))
for i, n := range names {
return r
}
-func TestTermlistTop(t *testing.T) {
+func TestTermlistAll(t *testing.T) {
if !allTermlist.isAll() {
- t.Errorf("topTermlist is not top")
+ t.Errorf("allTermlist is not the set of all types")
}
}
break
}
}
-
buf.WriteString(t.name)
case *Array:
case *Interface:
buf.WriteString("interface{")
first := true
+ // print explicit interface methods and embedded types
for _, m := range t.methods {
if !first {
buf.WriteString("; ")