Add test gen for multimorphic capture

This commit is contained in:
Ayaz Hafiz 2022-06-28 17:26:42 -04:00 committed by ayazhafiz
parent 8be230695b
commit ada4b0ea43
No known key found for this signature in database
GPG key ID: B443F7A3030C9AED
3 changed files with 49 additions and 1 deletions

View file

@ -2599,9 +2599,20 @@ fn finish_specialization(
.into_inner()
.into_module_ids();
let mut all_ident_ids = state.constrained_ident_ids;
let multimorphic_idents = state
.multimorphic_names
.try_unwrap_names()
.expect("There were still outstanding Arc references to multimorphic_names");
let old_idents = all_ident_ids.insert(ModuleId::MULTIMORPHIC, multimorphic_idents);
debug_assert!(
old_idents.is_none() || old_idents.unwrap().is_empty(),
"duplicate multimorphic idents"
);
let interns = Interns {
module_ids,
all_ident_ids: state.constrained_ident_ids,
all_ident_ids,
};
let State {