mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-26 21:39:07 +00:00
Collect deeply nested type names in alias analysis
Previously we only collected type names that appeared on the surface of a type during alias analysis, but certain types that need to be named (i.e. recursive types) may be observed only when we actually convert the IR to the morphic IR. Make sure we collect those appropriately. This is a cherry pick of the relevant changes in #4121.
This commit is contained in:
parent
de472015f6
commit
3723071c15
4 changed files with 218 additions and 139 deletions
|
@ -4259,12 +4259,16 @@ fn build_procedures_help<'a, 'ctx, 'env>(
|
|||
|
||||
let it = procedures.iter().map(|x| x.1);
|
||||
|
||||
let solutions =
|
||||
match roc_alias_analysis::spec_program(env.layout_interner, opt_level, opt_entry_point, it)
|
||||
{
|
||||
Err(e) => panic!("Error in alias analysis: {}", e),
|
||||
Ok(solutions) => solutions,
|
||||
};
|
||||
let solutions = match roc_alias_analysis::spec_program(
|
||||
env.arena,
|
||||
env.layout_interner,
|
||||
opt_level,
|
||||
opt_entry_point,
|
||||
it,
|
||||
) {
|
||||
Err(e) => panic!("Error in alias analysis: {}", e),
|
||||
Ok(solutions) => solutions,
|
||||
};
|
||||
|
||||
let solutions = env.arena.alloc(solutions);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue