Преглед на файлове

[lua] haxe Function constraints are caught by is_function_type

Justin Donaldson преди 7 години
родител
ревизия
a560afe4a8
променени са 1 файла, в които са добавени 6 реда и са изтрити 3 реда
  1. 6 3
      src/generators/genlua.ml

+ 6 - 3
src/generators/genlua.ml

@@ -339,9 +339,12 @@ let gen_constant ctx p = function
     | TSuper -> assert false
 
 
-let rec is_function_type t = match follow(t) with
-        | TFun _ -> true
-        | _ -> false
+
+let rec is_function_type t =
+    match follow(t) with
+    | TFun _ -> true
+    | TAbstract({a_path=["haxe"],"Function" },_) -> true
+    | _ -> false
 
 and gen_argument ctx e = begin
     match e.eexpr with