diff options
Diffstat (limited to 'src/main/javassist/compiler')
-rw-r--r-- | src/main/javassist/compiler/TypeChecker.java | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/main/javassist/compiler/TypeChecker.java b/src/main/javassist/compiler/TypeChecker.java index fc6a567e..35a8e378 100644 --- a/src/main/javassist/compiler/TypeChecker.java +++ b/src/main/javassist/compiler/TypeChecker.java @@ -899,6 +899,9 @@ public class TypeChecker extends Visitor implements Opcode, TokenId { public void atArrayLength(Expr expr) throws CompileError { expr.oprand1().accept(this); + if (arrayDim == 0) + throw new NoFieldException("length", expr); + exprType = INT; arrayDim = 0; } |