summaryrefslogtreecommitdiff
path: root/sources
diff options
context:
space:
mode:
authorpaltherr <paltherr@epfl.ch>2003-03-07 09:12:37 +0000
committerpaltherr <paltherr@epfl.ch>2003-03-07 09:12:37 +0000
commitaa82c43f10fd1533328e2da0eb77e120c6944554 (patch)
tree88efc983b3fb75e685aa853176f92608661e449f /sources
parentbb0968e9531b694ab7b5f9e613a60dd68e469c82 (diff)
downloadscala-aa82c43f10fd1533328e2da0eb77e120c6944554.tar.gz
scala-aa82c43f10fd1533328e2da0eb77e120c6944554.tar.bz2
scala-aa82c43f10fd1533328e2da0eb77e120c6944554.zip
- bug fix (tuple literal == empty block)
Diffstat (limited to 'sources')
-rw-r--r--sources/scala/tools/scalai/ExpressionCompiler.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/sources/scala/tools/scalai/ExpressionCompiler.java b/sources/scala/tools/scalai/ExpressionCompiler.java
index 9e864f98a6..47774ac700 100644
--- a/sources/scala/tools/scalai/ExpressionCompiler.java
+++ b/sources/scala/tools/scalai/ExpressionCompiler.java
@@ -108,7 +108,8 @@ public class ExpressionCompiler {
return Code.Label(symbol, vars, compute(body));
case Block(Tree[] stats):
- assert stats.length > 0;
+ if (stats.length == 0) return Code.Literal(constants.literal());
+ // !!! assert stats.length > 0;
CodeBuffer buffer = new CodeBuffer();
int stacksize = context.stacksize();
for (int i = 0; i < stats.length - 1; i++)