Skip to content

Commit

Permalink
[java/cs] Silly Option.get fix
Browse files Browse the repository at this point in the history
  • Loading branch information
waneck committed Mar 3, 2014
1 parent c560a9e commit 8219759
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion gencommon.ml
Original file line number Diff line number Diff line change
Expand Up @@ -9942,8 +9942,12 @@ struct
let rec replace_args e = match e.eexpr with
| TLocal(v) -> (try
let v2,o = List.assq v arg_assoc in
let o = match o with
| None -> raise Not_found
| Some o -> o
in
let e = { e with eexpr = TLocal v2; etype = basic.tnull e.etype } in
let const = mk_cast e.etype { e with eexpr = TConst(Option.get o); etype = v.v_type } in
let const = mk_cast e.etype { e with eexpr = TConst(o); etype = v.v_type } in
found := true;
{ e with eexpr = TIf({
eexpr = TBinop(Ast.OpEq, e, null e.etype e.epos);
Expand Down

0 comments on commit 8219759

Please sign in to comment.