Prechádzať zdrojové kódy

make sure that Null<Null<T>> is still considered null (closes #2225)

Simon Krajewski 12 rokov pred
rodič
commit
355028ce22
1 zmenil súbory, kde vykonal 1 pridanie a 1 odobranie
  1. 1 1
      type.ml

+ 1 - 1
type.ml

@@ -650,7 +650,7 @@ let rec is_null = function
 	| TMono r ->
 		(match !r with None -> false | Some t -> is_null t)
 	| TType ({ t_path = ([],"Null") },[t]) ->
-		not (is_nullable t)
+		not (is_nullable (follow t))
 	| TLazy f ->
 		is_null (!f())
 	| TType (t,tl) ->