summaryrefslogtreecommitdiff
path: root/sources/scalac/transformer/AddInterfaces.java
diff options
context:
space:
mode:
Diffstat (limited to 'sources/scalac/transformer/AddInterfaces.java')
-rw-r--r--sources/scalac/transformer/AddInterfaces.java15
1 files changed, 8 insertions, 7 deletions
diff --git a/sources/scalac/transformer/AddInterfaces.java b/sources/scalac/transformer/AddInterfaces.java
index c5b6b94fab..5722cf4396 100644
--- a/sources/scalac/transformer/AddInterfaces.java
+++ b/sources/scalac/transformer/AddInterfaces.java
@@ -221,20 +221,21 @@ public class AddInterfaces extends GenTransformer {
}
/**
- * Returns the tree of the given class whose body is built by
- * adding to the given body the class members. Non-abstract
- * methods are removed from the ngiven method map. All other
- * members are generated from their symbol.
+ * Returns the tree of the given class. Its body is built by
+ * adding its members to the provided body. Non-abstract methods
+ * are removed from the provided method map. All other members are
+ * generated from their symbol.
*/
private Tree getClassTree(Symbol clasz, TreeList body, Map methods) {
Scope members = clasz.nextInfo().members();
- for (Scope.SymbolIterator i = members.iterator();
- i.hasNext(); ) {
+ for (Scope.SymbolIterator i = members.iterator(); i.hasNext(); ) {
Symbol member = i.next();
if (!member.isTerm()) continue;
body.append(getMemberTree(clasz, member, methods));
}
- return gen.ClassDef(clasz, body.toArray());
+ Tree[] array = body.toArray();
+ if (!clasz.isInterface()) phase.classToBody.put(clasz, array);
+ return gen.ClassDef(clasz, array);
}
/**