Lower params when calling imported functions

This commit is contained in:
Agus Zubiaga 2024-08-17 01:03:34 -03:00
parent 7a8b9f7d6d
commit 97ddae7e3d
No known key found for this signature in database
8 changed files with 181 additions and 1 deletions

View file

@ -5032,7 +5032,7 @@ fn canonicalize_and_constrain<'a>(
let mut var_store = VarStore::default();
let module_output = canonicalize_module_defs(
let mut module_output = canonicalize_module_defs(
arena,
parsed_defs,
&header_type,
@ -5091,6 +5091,13 @@ fn canonicalize_and_constrain<'a>(
// _before has an underscore because it's unused in --release builds
let _before = roc_types::types::get_type_clone_count();
// lower module params
roc_lower_params::lower(
module_output.params_pattern.clone(),
&mut module_output.declarations,
&mut var_store,
);
let mut constraints = Constraints::new();
let constraint = if skip_constraint_gen {