Properly link lambda set variables in host exposed aliases

This commit is contained in:
Ayaz Hafiz 2022-07-14 12:20:39 -04:00
parent 4a9a1b301f
commit 161c2101a7
No known key found for this signature in database
GPG key ID: 0E2A37416A25EF58

View file

@ -2840,6 +2840,15 @@ fn type_to_variable<'a>(
let copy_var = helper!(arg_type);
subs.variables[target_index] = copy_var;
}
let it = (new_variables.indices().skip(type_arguments.len()))
.zip(lambda_set_variables);
for (target_index, ls) in it {
// We MUST do this now, otherwise when linking the ambient function during
// instantiation of the real var, there will be nothing to link against.
let copy_var =
type_to_variable(subs, rank, pools, arena, aliases, &ls.0, true);
subs.variables[target_index] = copy_var;
}
AliasVariables {
variables_start: new_variables.start,