Commit 7aa58734 authored by John van Groningen's avatar John van Groningen
Browse files

fix coercibility check of instance of classes with a . before a (constructor) class variable

parent aef2ea32
......@@ -2420,14 +2420,14 @@ where
= (checkError ins_types " instance is overlapping" error, IT_Node ins it_less it_greater)
check_types_of_instances ins_pos common_defs class_module class_index types state
# {class_arity,class_cons_vars} = common_defs.[class_module].com_class_defs.[class_index]
= check_instances_of_constructor_variables ins_pos common_defs class_cons_vars (dec class_arity) types state
# {class_cons_vars} = common_defs.[class_module].com_class_defs.[class_index]
= check_instances_of_constructor_variables ins_pos common_defs class_cons_vars 0 types state
where
check_instances_of_constructor_variables ins_pos common_defs cons_vars arg_nr [type : types] state
| cons_vars bitand (1 << arg_nr) <> 0
# state = check_type_of_constructor_variable ins_pos common_defs type state
= check_instances_of_constructor_variables ins_pos common_defs cons_vars (dec arg_nr) types state
= check_instances_of_constructor_variables ins_pos common_defs cons_vars (dec arg_nr) types state
= check_instances_of_constructor_variables ins_pos common_defs cons_vars (arg_nr+1) types state
= check_instances_of_constructor_variables ins_pos common_defs cons_vars (arg_nr+1) types state
check_instances_of_constructor_variables ins_pos common_defs cons_vars arg_nr [] state
= state
......
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