warning 52: change wording (Jacques Garrigue and Mark Shinwell)
parent
f7bedc7d34
commit
db1e523119
6
Changes
6
Changes
|
@ -47,6 +47,12 @@ OCaml 4.04.0:
|
|||
"transitive" heap size of a value
|
||||
(Alain Frisch, review by Marc Shinwell and Damien Doligez)
|
||||
|
||||
### Manual:
|
||||
|
||||
- PR#7245, GPR#565: clarification to the wording and documentation
|
||||
of Warning 52 (fragile constant pattern)
|
||||
(Gabriel Scherer, William, Adrien Nader, Jacques Garrigue)
|
||||
|
||||
### Build system:
|
||||
|
||||
- GPR#324: Compiler developpers only: Adding new primitives to the
|
||||
|
|
|
@ -801,9 +801,9 @@ This section describes and explains in detail some warnings:
|
|||
|
||||
> | Foo "specific value" -> 0
|
||||
> ^^^^^^^^^^^^^^^^
|
||||
> Warning 52: the argument of this constructor should not be matched against a
|
||||
> constant pattern; the actual value of the argument could change
|
||||
> in the future.
|
||||
> Warning 52: Code should not depend on the actual values of
|
||||
> this constructor's arguments. They are only for information
|
||||
> and may change in future versions. (See manual section 8.5)
|
||||
\end{verbatim}
|
||||
|
||||
In particular, all built-in exceptions with a string argument have
|
||||
|
|
|
@ -438,9 +438,9 @@ let message = function
|
|||
Printf.sprintf "expected tailcall"
|
||||
| Fragile_literal_pattern ->
|
||||
Printf.sprintf
|
||||
"the argument of this constructor should not be matched against a\n\
|
||||
constant pattern; the actual value of the argument could change\n\
|
||||
in the future."
|
||||
"Code should not depend on the actual values of\n\
|
||||
this constructor's arguments. They are only for information\n\
|
||||
and may change in future versions. (See manual section 8.5)"
|
||||
| Unreachable_case ->
|
||||
"this match case is unreachable.\n\
|
||||
Consider replacing it with a refutation case '<pat> -> .'"
|
||||
|
|
Loading…
Reference in New Issue