aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/javassist/compiler/CodeGen.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/javassist/compiler/CodeGen.java')
-rw-r--r--src/main/javassist/compiler/CodeGen.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main/javassist/compiler/CodeGen.java b/src/main/javassist/compiler/CodeGen.java
index d2bdea9a..e02884de 100644
--- a/src/main/javassist/compiler/CodeGen.java
+++ b/src/main/javassist/compiler/CodeGen.java
@@ -1420,12 +1420,13 @@ public abstract class CodeGen extends Visitor implements Opcode, TokenId {
int type = expr.getType();
oprand.accept(this);
int srcType = exprType;
+ int srcDim = arrayDim;
if (invalidDim(srcType, arrayDim, className, type, dim, name, true)
|| srcType == VOID || type == VOID)
throw new CompileError(msg);
if (type == CLASS) {
- if (!isRefType(srcType))
+ if (!isRefType(srcType) && srcDim == 0)
throw new CompileError(msg);
return toJvmArrayName(name, dim);