mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-30 15:21:12 +00:00
IT WORKS
This commit is contained in:
parent
d0f031fe6c
commit
40ffca2b7b
16 changed files with 511 additions and 200 deletions
|
@ -117,7 +117,11 @@ pub fn canonicalize_pattern<'a>(
|
|||
&mut env.ident_ids,
|
||||
region,
|
||||
) {
|
||||
Ok(symbol) => Pattern::Identifier(symbol),
|
||||
Ok(symbol) => {
|
||||
output.references.bound_symbols.insert(symbol);
|
||||
|
||||
Pattern::Identifier(symbol)
|
||||
}
|
||||
Err((original_region, shadow)) => {
|
||||
env.problem(Problem::RuntimeError(RuntimeError::Shadowing {
|
||||
original_region,
|
||||
|
@ -254,6 +258,8 @@ pub fn canonicalize_pattern<'a>(
|
|||
region,
|
||||
) {
|
||||
Ok(symbol) => {
|
||||
output.references.bound_symbols.insert(symbol);
|
||||
|
||||
destructs.push(Located {
|
||||
region: loc_pattern.region,
|
||||
value: RecordDestruct {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue