Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
…in a list of patterns was done too late for disjunctive patterns Reviewed-by: proux01 Co-authored-by: proux01 <proux01@users.noreply.github.com>
- Loading branch information
Showing
4 changed files
with
39 additions
and
20 deletions.
There are no files selected for viewing
5 changes: 5 additions & 0 deletions
5
...anguage/17857-master+fix17854-too-late-duplicate-var-check-pattern-matching.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
- **Fixed:** | ||
Anomaly in the presence of duplicate variables within a disjunctive pattern | ||
(`#17857 <https://github.com/coq/coq/pull/17857>`_, | ||
fixes `#17854 <https://github.com/coq/coq/issues/17854>`_, | ||
by Hugo Herbelin). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
File "./output/bug_17854.v", line 3, characters 11-31: | ||
The command has indeed failed with message: | ||
The variable a is bound several times in pattern. | ||
File "./output/bug_17854.v", line 9, characters 11-31: | ||
The command has indeed failed with message: | ||
The variable a is bound several times in pattern. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
Fail Check fun b : bool | ||
=> match b, b with | ||
| true as a, true as a | true as a, _ => true | ||
| _, _ => false | ||
end. | ||
|
||
Fail Check fun b : bool | ||
=> match b, b with | ||
| true as a, true as a => true | ||
| _, _ => false | ||
end. | ||
|
||
Definition f b := | ||
match b, b with | ||
| true as a as a, true as b => true | ||
| _, _ => false | ||
end. |