Переглянути джерело

[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