Explorar o código

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

Nicolas Cannasse %!s(int64=13) %!d(string=hai) anos
pai
achega
8e817d9e5f
Modificáronse 1 ficheiros con 2 adicións e 0 borrados
  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") },[])