Skip to content

Commit

Permalink
[java/cs] Make sure the main expression is always a block
Browse files Browse the repository at this point in the history
  • Loading branch information
waneck committed Oct 8, 2016
1 parent 9d450a1 commit 9ab880c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/generators/gencs.ml
Original file line number Diff line number Diff line change
Expand Up @@ -2416,7 +2416,7 @@ let configure gen =
expr_s w { eexpr = TTypeExpr(TClassDecl cl); etype = t_dynamic; epos = null_pos };
write w ".main();"
| Some expr ->
expr_s w expr);
expr_s w (mk_block expr));
end_block w;
end_block w;
newline w;
Expand Down Expand Up @@ -2460,7 +2460,7 @@ let configure gen =
| None ->
write w "main();";
| Some expr ->
expr_s w expr);
expr_s w (mk_block expr));
end_block w
end;

Expand Down
2 changes: 1 addition & 1 deletion src/generators/genjava.ml
Original file line number Diff line number Diff line change
Expand Up @@ -1955,7 +1955,7 @@ let configure gen =
);
(match gen.gcon.main with
| Some(expr) ->
expr_s w expr
expr_s w (mk_block expr)
| None ->
write w "main();");
end_block w;
Expand Down

0 comments on commit 9ab880c

Please sign in to comment.