don't send RecursionVar as FlexVar; use the structure var instead

This commit is contained in:
Folkert 2021-03-03 21:33:16 +01:00
parent 1c9cc6bc9b
commit 86ebad4d95

View file

@ -371,7 +371,10 @@ impl SolvedType {
match subs.get_without_compacting(var).content { match subs.get_without_compacting(var).content {
FlexVar(_) => SolvedType::Flex(VarId::from_var(var, subs)), FlexVar(_) => SolvedType::Flex(VarId::from_var(var, subs)),
RecursionVar { .. } => SolvedType::Flex(VarId::from_var(var, subs)), RecursionVar { structure, .. } => {
// TODO should there be a SolvedType RecursionVar variant?
Self::from_var_help(subs, recursion_vars, structure)
}
RigidVar(name) => SolvedType::Rigid(name), RigidVar(name) => SolvedType::Rigid(name),
Structure(flat_type) => Self::from_flat_type(subs, recursion_vars, flat_type), Structure(flat_type) => Self::from_flat_type(subs, recursion_vars, flat_type),
Alias(symbol, args, actual_var) => { Alias(symbol, args, actual_var) => {