Browse Source

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

Nicolas Cannasse 13 năm trước cách đây
mục cha
commit
8e817d9e5f
1 tập tin đã thay đổi với 2 bổ sung0 xóa
  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") },[])