浏览代码

[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