For PR#6897

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16183 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
master
Jacques Garrigue 2015-06-23 08:38:16 +00:00
parent b650a13145
commit 0e56dde7be
1 changed files with 14 additions and 3 deletions

View File

@ -76,10 +76,21 @@ Error: Signature mismatch:
^^^^^^^^^^^^^^^^^^
Warning 8: this pattern-matching is not exhaustive.
Here is an example of a value that is not matched:
_
Matching over values of extensible variant types must include
a wild card pattern in order to be exhaustive.
*extension*
Matching over values of extensible variant types (the *extension* above)
must include a wild card pattern in order to be exhaustive.
type foo = ..
type foo += Foo
val f : foo -> unit = <fun>
# Characters 44-96:
........function
| [Foo] -> 1
| _::_::_ -> 3
| [] -> 2
Warning 8: this pattern-matching is not exhaustive.
Here is an example of a value that is not matched:
*extension*::[]
Matching over values of extensible variant types (the *extension* above)
must include a wild card pattern in order to be exhaustive.
val f : foo list -> int = <fun>
#