mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-29 14:54:47 +00:00
report malformed int and float patterns
This commit is contained in:
parent
a05b664be0
commit
0c7a4179aa
8 changed files with 208 additions and 27 deletions
|
@ -52,6 +52,7 @@ fn headers_from_annotation_help(
|
|||
}
|
||||
Underscore
|
||||
| Shadowed(_, _)
|
||||
| MalformedPattern(_, _)
|
||||
| UnsupportedPattern(_)
|
||||
| NumLiteral(_, _)
|
||||
| IntLiteral(_)
|
||||
|
@ -117,7 +118,7 @@ pub fn constrain_pattern(
|
|||
state: &mut PatternState,
|
||||
) {
|
||||
match pattern {
|
||||
Underscore | UnsupportedPattern(_) | Shadowed(_, _) => {
|
||||
Underscore | UnsupportedPattern(_) | MalformedPattern(_, _) | Shadowed(_, _) => {
|
||||
// Neither the _ pattern nor erroneous ones add any constraints.
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue