Bläddra i källkod

require null patterns for exhaustiveness if the type is explicitly nullable

Simon Krajewski 11 år sedan
förälder
incheckning
0f43ad8b6d
1 ändrade filer med 1 tillägg och 1 borttagningar
  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 rec all_ctors mctx t =
 	let h = ref PMap.empty in
 	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
 	match follow t with
 	| TAbstract({a_path = [],"Bool"},_) ->
 	| TAbstract({a_path = [],"Bool"},_) ->
 		h := PMap.add (CConst(TBool true)) Ast.null_pos !h;
 		h := PMap.add (CConst(TBool true)) Ast.null_pos !h;