File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -1618,6 +1618,9 @@ func extractType(tw *trap.Writer, tp types.Type) trap.Label {
1618
1618
case * types.Interface :
1619
1619
kind = dbscheme .InterfaceType .Index ()
1620
1620
for i := 0 ; i < tp .NumMethods (); i ++ {
1621
+ // Note that methods coming from embedded interfaces can be
1622
+ // accessed through `Method(i)`, so there is no need to
1623
+ // deal with them separately.
1621
1624
meth := tp .Method (i )
1622
1625
1623
1626
// Note that methods do not have a parent scope, so they are
Original file line number Diff line number Diff line change @@ -742,7 +742,8 @@ class InterfaceType extends @interfacetype, CompositeType {
742
742
/** Gets the type of method `name` of this interface type. */
743
743
Type getMethodType ( string name ) {
744
744
// Note that negative indices correspond to embedded interfaces and type
745
- // set literals.
745
+ // set literals. Note also that methods coming from embedded interfaces
746
+ // have already been included in `component_types`.
746
747
exists ( int i | i >= 0 | component_types ( this , i , name , result ) )
747
748
}
748
749
You can’t perform that action at this time.
0 commit comments