Explorar o código

require null patterns for exhaustiveness if the type is explicitly nullable

Simon Krajewski %!s(int64=11) %!d(string=hai) anos
pai
achega
0f43ad8b6d
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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;