This is only a temp fix.
@@ -331,7 +331,7 @@ let check_local_vars_init e =
| _ ->
Type.iter (loop vars) e
in
- loop (ref PMap.empty) e;
+ loop (ref PMap.empty) (match e.eexpr with TFunction tf -> tf.tf_expr | _ -> e); (* temp fix for #4466 *)
e
(* -------------------------------------------------------------------------- *)
@@ -0,0 +1,6 @@
+class Main {
+ static function main() {
+ var a;
+ var b = a + 1;
+ }
+}
@@ -0,0 +1,2 @@
+-main Main
+--interp
@@ -0,0 +1 @@
+Main.hx:4: characters 16-17 : Local variable a used without being initialized