From 0c55973365e7e23f3e829f694d6a9abf4f2a7209 Mon Sep 17 00:00:00 2001 From: johnvg Date: Wed, 15 Aug 2012 12:51:58 +0000 Subject: fix coercibility check of instance of classes with a . before a (constructor) class variable git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@2152 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d --- frontend/type.icl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'frontend/type.icl') diff --git a/frontend/type.icl b/frontend/type.icl index 596d063..51ba6d2 100644 --- a/frontend/type.icl +++ b/frontend/type.icl @@ -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 -- cgit v1.2.3