mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-26 13:29:12 +00:00
Merge pull request #3598 from rtfeldman/i3558
Compile variables bound in multiple patterns of a branch, and detect unbound patterns
This commit is contained in:
commit
b7d78d9237
11 changed files with 313 additions and 34 deletions
|
@ -2327,9 +2327,9 @@ fn to_pending_type_def<'a>(
|
|||
|
||||
let member_sym = match scope.introduce(member_name.into(), name_region) {
|
||||
Ok(sym) => sym,
|
||||
Err((original_region, shadow, _new_symbol)) => {
|
||||
Err((shadowed_symbol, shadow, _new_symbol)) => {
|
||||
env.problem(roc_problem::can::Problem::Shadowing {
|
||||
original_region,
|
||||
original_region: shadowed_symbol.region,
|
||||
shadow,
|
||||
kind: ShadowKind::Variable,
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue