summaryrefslogtreecommitdiff
path: root/sources/scalac/transformer/AddInterfaces.java
diff options
context:
space:
mode:
authorpaltherr <paltherr@epfl.ch>2004-12-07 14:56:23 +0000
committerpaltherr <paltherr@epfl.ch>2004-12-07 14:56:23 +0000
commitcbd30cf21cbde81a1613226e920c282bd9ebfdf7 (patch)
tree34c75a92abb6dfde4b6881162e22c24fc5fe8c48 /sources/scalac/transformer/AddInterfaces.java
parentb8c700cd8f89695a9086636a1bd8442ee8d43200 (diff)
downloadscala-cbd30cf21cbde81a1613226e920c282bd9ebfdf7.tar.gz
scala-cbd30cf21cbde81a1613226e920c282bd9ebfdf7.tar.bz2
scala-cbd30cf21cbde81a1613226e920c282bd9ebfdf7.zip
- Removed method Transformer.apply(CompilationU...
- Removed method Transformer.apply(CompilationUnit[] - Added method ) Phase.apply(CompilationUnit - Adapted most phases to implement method ) Phase.apply(CompilationUnit instead of Phase.apply(CompilationUnit[] )
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);
}
/**