Browse Source

TIL OCaml doesn't complain about both partial application and unused variable if the binding name starts with underscore

alternatively we could write `let _ : unit->unit = ...`  to specify the intent, but this is shorter

closes #8691
Dan Korostelev 5 years ago
parent
commit
75523c67a5
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/generators/genswf9.ml

+ 1 - 1
src/generators/genswf9.ml

@@ -1159,7 +1159,7 @@ let rec gen_expr_content ctx retval e =
 		gen_expr ctx false e;
 		gen_expr ctx false e;
 		if flag = NormalWhile then jstart();
 		if flag = NormalWhile then jstart();
 		let continue_pos = ctx.infos.ipos in
 		let continue_pos = ctx.infos.ipos in
-		let _ = jump_expr_gen ctx econd true (fun j -> loop j; (fun() -> ())) in
+		let _j = jump_expr_gen ctx econd true (fun j -> loop j; (fun() -> ())) in
 		branch();
 		branch();
 		end_loop continue_pos;
 		end_loop continue_pos;
 		if retval then write ctx HNull
 		if retval then write ctx HNull