소스 검색

[typer] fix bad bug

Simon Krajewski 6 년 전
부모
커밋
081f503134
1개의 변경된 파일3개의 추가작업 그리고 3개의 파일을 삭제
  1. 3 3
      src/core/type.ml

+ 3 - 3
src/core/type.ml

@@ -761,13 +761,13 @@ let rec is_null ?(no_lazy=false) = function
 (* Determines if we have a Null<T>. Unlike is_null, this returns true even if the wrapped type is nullable itself. *)
 let rec is_explicit_null = function
 	| TMono r ->
-		(match !r with None -> false | Some t -> is_null t)
+		(match !r with None -> false | Some t -> is_explicit_null t)
 	| TAbstract ({ a_path = ([],"Null") },[t]) ->
 		true
 	| TLazy f ->
-		is_null (lazy_type f)
+		is_explicit_null (lazy_type f)
 	| TType (t,tl) ->
-		is_null (apply_params t.t_params tl t.t_type)
+		is_explicit_null (apply_params t.t_params tl t.t_type)
 	| _ ->
 		false