Explorar o código

fixed the null fix

Simon Krajewski %!s(int64=12) %!d(string=hai) anos
pai
achega
d3c47d2ec2
Modificáronse 1 ficheiros con 1 adicións e 3 borrados
  1. 1 3
      matcher.ml

+ 1 - 3
matcher.ml

@@ -288,9 +288,7 @@ let to_pattern ctx e t =
 						(* reverse application of apply_params will replace free monomorphs with their original type parameters *)
 						List.map (fun (n,_,t) ->
 							let tf = apply_params mono_map tpl (follow t) in
-							match t with
-							| TType ({ t_path = ([],"Null") },[_]) -> ctx.t.tnull tf
-							| _ -> tf
+							if is_null t then ctx.t.tnull tf else tf
 						) args
 					| _ -> error "Arguments expected" p
 				in