浏览代码

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

Simon Krajewski 12 年之前
父节点
当前提交
355028ce22
共有 1 个文件被更改,包括 1 次插入1 次删除
  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) ->