소스 검색

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") },[])