Explorar el Código

[php] fixed false detection of `catch` vars in anon functions
as captured from outer scope

Aleksandr Kuzmenko hace 5 años
padre
commit
3455b817fd
Se han modificado 1 ficheros con 1 adiciones y 0 borrados
  1. 1 0
      src/generators/genphp7.ml

+ 1 - 0
src/generators/genphp7.ml

@@ -1885,6 +1885,7 @@ class code_writer (ctx:php_generator_context) hx_type_path php_name =
 				| [] -> ()
 				| (v,body) :: rest ->
 					self#write (" catch(" ^ (self#use_t v.v_type) ^ " $" ^ v.v_name ^ ") ");
+					vars#declared v.v_name;
 					self#write_as_block body;
 					traverse rest
 			in