feat(parse): support capturing a str in Pattern::Underscore

This commit is contained in:
rvcas 2020-11-17 21:53:49 -05:00
parent ce67f28c42
commit 8df5d5c13c
5 changed files with 15 additions and 12 deletions

View file

@ -197,7 +197,7 @@ pub fn canonicalize_pattern<'a>(
ptype => unsupported_pattern(env, ptype, region),
},
Underscore => match pattern_type {
Underscore(_) => match pattern_type {
WhenBranch | FunctionArg => Pattern::Underscore,
ptype => unsupported_pattern(env, ptype, region),
},