summaryrefslogtreecommitdiff
path: root/sources
diff options
context:
space:
mode:
authorpaltherr <paltherr@epfl.ch>2003-10-15 14:56:30 +0000
committerpaltherr <paltherr@epfl.ch>2003-10-15 14:56:30 +0000
commit85ecdee41a4619105433e29ee3ed97e127ecf8d5 (patch)
tree54893d76298fa46b8f16322346e08c551fff9285 /sources
parent99b4e7dc35d230c0b5173cfd4c0095499f026a57 (diff)
downloadscala-85ecdee41a4619105433e29ee3ed97e127ecf8d5.tar.gz
scala-85ecdee41a4619105433e29ee3ed97e127ecf8d5.tar.bz2
scala-85ecdee41a4619105433e29ee3ed97e127ecf8d5.zip
- Added test for empty tree nodes in ClassDef
Diffstat (limited to 'sources')
-rw-r--r--sources/scalac/ast/TreeGen.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/sources/scalac/ast/TreeGen.java b/sources/scalac/ast/TreeGen.java
index d52a2c2fa4..3e2d6171d3 100644
--- a/sources/scalac/ast/TreeGen.java
+++ b/sources/scalac/ast/TreeGen.java
@@ -771,7 +771,8 @@ public class TreeGen implements Kinds, Modifiers, TypeTags {
/** Builds a ClassDef node for given class with given body. */
public Tree ClassDef(Symbol clazz, Tree[] body) {
for (int i = 0; i < body.length; i++) {
- assert body[i].definesSymbol() && body[i].symbol().owner() ==clazz:
+ assert body[i] == Tree.Empty
+ || body[i].definesSymbol() && body[i].symbol().owner() ==clazz:
"\nclass : " + clazz +
"\nmember: " + body[i];
}