Skip to content

Commit 894df10

Browse files
committed
Update the manual for the generalized warning 52.
1 parent 5521787 commit 894df10

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

manual/manual/cmds/comp.etex

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -423,6 +423,11 @@ let dy { y; _ } = y (* explicit field elision: do not trigger warning 9 *)
423423
this attribute set: "Invalid_argument", "Failure", "Sys_error" will
424424
all raise this warning if you match for a specific string argument.
425425

426+
Additionally, built-in exceptions with a structured argument that
427+
includes a string also have the attribute set: "Assert_failure" and
428+
"Match_failure" will raise the warning for a pattern that uses a
429+
literal string to match the first element of their tuple argument.
430+
426431
If your code raises this warning, you should {\em not} change the
427432
way you test for the specific string to avoid the warning (for
428433
example using a string equality inside the right-hand-side instead

0 commit comments

Comments
 (0)