瀏覽代碼

make sure that type parameter is nullable (can be substituted with basic type)

Nicolas Cannasse 13 年之前
父節點
當前提交
8e817d9e5f
共有 1 個文件被更改,包括 2 次插入0 次删除
  1. 2 0
      type.ml

+ 2 - 0
type.ml

@@ -534,6 +534,8 @@ let rec is_nullable ?(no_lazy=false) = function
 		is_nullable (apply_params t.t_types tl t.t_type)
 	| TFun _ ->
 		false
+	| TInst ({ cl_kind = KTypeParameter },_) ->
+		false
 	| TInst ({ cl_path = (["haxe"],"Int32") },[])
 	| TInst ({ cl_path = ([],"Int") },[])
 	| TInst ({ cl_path = ([],"Float") },[])