From 4d174d8311f39bbb6d5a7816609c0cf45cb6be71 Mon Sep 17 00:00:00 2001 From: johnvg Date: Mon, 7 May 2012 09:42:46 +0000 Subject: fix incorrect array index in function cannot_unify git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@2067 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d --- frontend/type.icl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'frontend') diff --git a/frontend/type.icl b/frontend/type.icl index 8d563ce..d7462f1 100644 --- a/frontend/type.icl +++ b/frontend/type.icl @@ -231,7 +231,8 @@ cannot_unify t1 t2 position common_defs err CP_FunArg _ _ -> ea_file <<< "\"" <<< position <<< "\"" CP_SymbArg {symb_kind=SK_Constructor {glob_module,glob_object},symb_ident} arg_n - -> case common_defs.[glob_module].com_type_defs.[glob_object].td_rhs of + #! type_index = common_defs.[glob_module].com_cons_defs.[glob_object].cons_type_index + -> case common_defs.[glob_module].com_type_defs.[type_index].td_rhs of RecordType {rt_fields} # field_name = rt_fields.[arg_n-1].fs_ident.id_name record_name = symb_ident.id_name -- cgit v1.2.3