merge main

This commit is contained in:
Bryce Miller 2023-06-07 20:36:54 -04:00
commit e463ccf4a6
No known key found for this signature in database
GPG key ID: F1E97BF8DF152350
59 changed files with 1192 additions and 706 deletions

View file

@ -379,6 +379,12 @@ pub fn canonicalize_pattern<'a>(
Err(pattern) => pattern,
}
}
Underscore(name) => {
// An underscored identifier can't be used, but we'll still add it to the scope
// for better error messages if someone tries to use it.
scope.introduce_ignored_local(name, region);
Pattern::Underscore
}
Tag(name) => {
// Canonicalize the tag's name.
Pattern::AppliedTag {
@ -479,8 +485,6 @@ pub fn canonicalize_pattern<'a>(
ptype => unsupported_pattern(env, ptype, region),
},
Underscore(_) => Pattern::Underscore,
&NumLiteral(str) => match pattern_type {
WhenBranch => match finish_parsing_num(str) {
Err(_error) => {