mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-04 04:08:19 +00:00
Desugar module param patterns before canonicalizing
This commit is contained in:
parent
3f9e957c9c
commit
5054c9990e
1 changed files with 5 additions and 1 deletions
|
@ -3,6 +3,7 @@ use std::path::Path;
|
|||
use crate::abilities::{AbilitiesStore, ImplKey, PendingAbilitiesStore, ResolvedImpl};
|
||||
use crate::annotation::{canonicalize_annotation, AnnotationFor};
|
||||
use crate::def::{canonicalize_defs, report_unused_imports, Def};
|
||||
use crate::desugar::desugar_record_destructures;
|
||||
use crate::env::Env;
|
||||
use crate::expr::{
|
||||
ClosureData, DbgLookup, Declarations, ExpectLookup, Expr, Output, PendingDerives,
|
||||
|
@ -326,13 +327,16 @@ pub fn canonicalize_module_defs<'a>(
|
|||
before_arrow: _,
|
||||
after_arrow: _,
|
||||
}| {
|
||||
let desugared_patterns =
|
||||
desugar_record_destructures(&mut env, &mut scope, pattern.value);
|
||||
|
||||
let (destructs, _) = canonicalize_record_destructs(
|
||||
&mut env,
|
||||
var_store,
|
||||
&mut scope,
|
||||
&mut output,
|
||||
PatternType::ModuleParams,
|
||||
&pattern.value,
|
||||
&desugared_patterns,
|
||||
pattern.region,
|
||||
PermitShadows(false),
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue