PR#4052 accept _ for all constructors

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@8789 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
master
Damien Doligez 2008-01-22 17:08:48 +00:00
parent beb152b1a9
commit cb40742e75
1 changed files with 1 additions and 1 deletions

View File

@ -413,7 +413,7 @@ let rec type_pat env sp =
None -> []
| Some {ppat_desc = Ppat_tuple spl} when explicit_arity -> spl
| Some {ppat_desc = Ppat_tuple spl} when constr.cstr_arity > 1 -> spl
| Some({ppat_desc = Ppat_any} as sp) when constr.cstr_arity > 1 ->
| Some({ppat_desc = Ppat_any} as sp) when constr.cstr_arity <> 1 ->
replicate_list sp constr.cstr_arity
| Some sp -> [sp] in
if List.length sargs <> constr.cstr_arity then