}
iface.embeddeds = append(iface.embeddeds, named)
// collect embedded methods
+ if debug && embed.allMethods == nil {
+ check.dump("%s: incomplete embedded interface %s", pos, named)
+ unreachable()
+ }
for _, m := range embed.allMethods {
if check.declareInSet(&mset, pos, m) {
iface.allMethods = append(iface.allMethods, m)
// claim source order in the future. Revisit.
sort.Sort(byUniqueTypeName(iface.embeddeds))
- sort.Sort(byUniqueMethodName(iface.allMethods))
+ if iface.allMethods == nil {
+ iface.allMethods = make([]*Func, 0) // mark interface as complete
+ } else {
+ sort.Sort(byUniqueMethodName(iface.allMethods))
+ }
}
// byUniqueTypeName named type lists can be sorted by their unique type names.