瀏覽代碼

require null patterns for exhaustiveness if the type is explicitly nullable

Simon Krajewski 11 年之前
父節點
當前提交
0f43ad8b6d
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      matcher.ml

+ 1 - 1
matcher.ml

@@ -798,7 +798,7 @@ let rec is_explicit_null = function
 
 let rec all_ctors mctx t =
 	let h = ref PMap.empty in
-	(* if is_explicit_null t then h := PMap.add (CConst TNull) Ast.null_pos !h; *)
+	if is_explicit_null t then h := PMap.add (CConst TNull) Ast.null_pos !h;
 	match follow t with
 	| TAbstract({a_path = [],"Bool"},_) ->
 		h := PMap.add (CConst(TBool true)) Ast.null_pos !h;