Skip to content

Commit 6c0c37e

Browse files
committed
fix try with no catch/finally
1 parent 76c8f45 commit 6c0c37e

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

src/jvm/clojure/lang/Compiler.java

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1798,9 +1798,7 @@ public Expr parse(C context, Object frm) throws Exception{
17981798
else
17991799
{
18001800
if(bodyExpr == null)
1801-
{
18021801
bodyExpr = (new BodyExpr.Parser()).parse(context, RT.seq(body));
1803-
}
18041802
if(Util.equals(op, CATCH))
18051803
{
18061804
Class c = HostExpr.maybeClass(RT.second(f), false);
@@ -1848,6 +1846,8 @@ public Expr parse(C context, Object frm) throws Exception{
18481846
}
18491847
}
18501848
}
1849+
if(bodyExpr == null)
1850+
bodyExpr = (new BodyExpr.Parser()).parse(context, RT.seq(body));
18511851

18521852
return new TryExpr(bodyExpr, catches, finallyExpr, retLocal,
18531853
finallyLocal);
@@ -3961,8 +3961,10 @@ private void emitLocal(GeneratorAdapter gen, LocalBinding lb, boolean clear){
39613961
gen.visitInsn(Opcodes.ACONST_NULL);
39623962
gen.storeArg(lb.idx - 1);
39633963
}
3964-
// else
3964+
else
3965+
{
39653966
// System.out.println("use: " + rep);
3967+
}
39663968
}
39673969
}
39683970
else
@@ -3981,8 +3983,10 @@ private void emitLocal(GeneratorAdapter gen, LocalBinding lb, boolean clear){
39813983
gen.visitInsn(Opcodes.ACONST_NULL);
39823984
gen.visitVarInsn(OBJECT_TYPE.getOpcode(Opcodes.ISTORE), lb.idx);
39833985
}
3984-
// else
3986+
else
3987+
{
39853988
// System.out.println("use: " + rep);
3989+
}
39863990
}
39873991
}
39883992
}

0 commit comments

Comments
 (0)