report malformed int and float patterns

This commit is contained in:
Folkert 2020-07-04 17:06:27 +02:00
parent a05b664be0
commit 0c7a4179aa
8 changed files with 208 additions and 27 deletions

View file

@ -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.
}