aboutsummaryrefslogtreecommitdiff
path: root/frontend/type.icl
diff options
context:
space:
mode:
authorjohnvg2012-05-07 09:42:46 +0000
committerjohnvg2012-05-07 09:42:46 +0000
commit4d174d8311f39bbb6d5a7816609c0cf45cb6be71 (patch)
treead4ada4002fcd1a5d31827a63229f12e120a5bbc /frontend/type.icl
parentin error message for incorrect field type print name of field instead of argu... (diff)
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
Diffstat (limited to 'frontend/type.icl')
-rw-r--r--frontend/type.icl3
1 files changed, 2 insertions, 1 deletions
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