Verified Commit 28c890cd authored by Camil Staps's avatar Camil Staps
Browse files

Resolve crash on existentially qualified type variables that already appear in...

Resolve crash on existentially qualified type variables that already appear in the left-hand side of the type
parent e4ab7387
...@@ -615,7 +615,9 @@ where ...@@ -615,7 +615,9 @@ where
= addExistentionalTypeVariablesToSymbolTable cti_lhs_attribute cons_def.cons_exi_vars ti_type_heaps cs = addExistentionalTypeVariablesToSymbolTable cti_lhs_attribute cons_def.cons_exi_vars ti_type_heaps cs
(st_args, st_attr_env,class_defs,(ts, ti=:{ti_type_heaps}, cs)) (st_args, st_attr_env,class_defs,(ts, ti=:{ti_type_heaps}, cs))
= bind_types_of_cons cons_def.cons_type.st_args cti free_vars [] class_defs (ts, {ti & ti_type_heaps = ti_type_heaps}, cs) = bind_types_of_cons cons_def.cons_type.st_args cti free_vars [] class_defs (ts, {ti & ti_type_heaps = ti_type_heaps}, cs)
(unused_exi_vars,th_vars,cs) | not cs.cs_error.ea_ok
= (class_defs, ts, ti, cs)
# (unused_exi_vars,th_vars,cs)
= find_unused_existential_type_vars exi_vars [] ti_type_heaps.th_vars cs = find_unused_existential_type_vars exi_vars [] ti_type_heaps.th_vars cs
(st_context,class_defs,ts,ti=:{ti_type_heaps},cs) (st_context,class_defs,ts,ti=:{ti_type_heaps},cs)
= bind_context_of_cons cons_def.cons_type.st_context cti class_defs ts { ti & ti_type_heaps = { ti_type_heaps & th_vars = th_vars } } cs = bind_context_of_cons cons_def.cons_type.st_context cti class_defs ts { ti & ti_type_heaps = { ti_type_heaps & th_vars = th_vars } } cs
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment