Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/v1/04_infer.dag
Original file line number Diff line number Diff line change
Expand Up @@ -5726,7 +5726,7 @@ fn build_type_env(module: ResolvedModule, parent_index: Map<String, TypedModule>
match module.resolved_imports |> first {
Present { value: imp } =>
match map_get(parent_index, imp.module_path) {
Present { value: parent_mod } => parent_mod.type_env_cache.str_bindings
Present { value: parent_mod } => map_merge(parent_mod.type_env.ancestry_str_bindings, parent_mod.type_env.str_bindings)
Absent => ancestry_cache.str_bindings
}
Absent => ancestry_cache.str_bindings
Expand Down Expand Up @@ -5840,7 +5840,7 @@ fn build_type_env_unresolved(module: ResolvedModule, parent_index: Map<String, T
match module.resolved_imports |> first {
Present { value: imp } =>
match map_get(parent_index, imp.module_path) {
Present { value: parent_mod } => parent_mod.type_env_cache.str_bindings
Present { value: parent_mod } => map_merge(parent_mod.type_env.ancestry_str_bindings, parent_mod.type_env.str_bindings)
Absent => ancestry_cache.str_bindings
}
Absent => ancestry_cache.str_bindings
Expand Down
10 changes: 8 additions & 2 deletions src/v1/stage0/src/v1_compiler_infer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12751,7 +12751,10 @@ pub fn build_type_env(
let ancestry_str_bindings = if module.resolved_imports.clone().len() == 1 {
if let Some(imp) = module.resolved_imports.clone().first().cloned() {
if let Some(parent_mod) = v1_rt::map_get(&parent_index, imp.module_path.clone()) {
parent_mod.type_env_cache.str_bindings.clone()
v1_rt::rc_map_merge(
parent_mod.type_env.ancestry_str_bindings.clone(),
parent_mod.type_env.str_bindings.clone(),
)
} else {
ancestry_cache.str_bindings.clone()
}
Expand Down Expand Up @@ -13197,7 +13200,10 @@ pub fn build_type_env_unresolved(
let ancestry_str_bindings = if module.resolved_imports.clone().len() == 1 {
if let Some(imp) = module.resolved_imports.clone().first().cloned() {
if let Some(parent_mod) = v1_rt::map_get(&parent_index, imp.module_path.clone()) {
parent_mod.type_env_cache.str_bindings.clone()
v1_rt::rc_map_merge(
parent_mod.type_env.ancestry_str_bindings.clone(),
parent_mod.type_env.str_bindings.clone(),
)
} else {
ancestry_cache.str_bindings.clone()
}
Expand Down
Loading