aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjohnvg2012-08-15 12:51:58 +0000
committerjohnvg2012-08-15 12:51:58 +0000
commit0c55973365e7e23f3e829f694d6a9abf4f2a7209 (patch)
tree15982e1195350f41c2dbbd82d62417f5ea2782d9
parentrename extendable to extensible (diff)
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
-rw-r--r--frontend/type.icl8
1 files changed, 4 insertions, 4 deletions
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