mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-27 13:59:08 +00:00
merge main
This commit is contained in:
commit
e463ccf4a6
59 changed files with 1192 additions and 706 deletions
|
@ -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) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue