aboutsummaryrefslogtreecommitdiff
path: root/frontend/checktypes.icl
diff options
context:
space:
mode:
authorjohnvg2003-06-19 15:05:26 +0000
committerjohnvg2003-06-19 15:05:26 +0000
commit71d1fc12174437671708f8497b3ddb98c6d99108 (patch)
treeb940499340c85db5efd70edb423e61d20a046658 /frontend/checktypes.icl
parentremoved unused module checkKindCorrectness (diff)
append a ";" after the name of the record of a dictionary
to prevent records with the same name if a class and record with the same name are defined in the same module git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@1357 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d
Diffstat (limited to 'frontend/checktypes.icl')
-rw-r--r--frontend/checktypes.icl7
1 files changed, 5 insertions, 2 deletions
diff --git a/frontend/checktypes.icl b/frontend/checktypes.icl
index f7d91de..d3ea1ac 100644
--- a/frontend/checktypes.icl
+++ b/frontend/checktypes.icl
@@ -1397,7 +1397,9 @@ where
# (type_id_info, symbol_table) = newPtr EmptySymbolTableEntry symbol_table
nr_of_members = size class_members
nr_of_fields = nr_of_members + length class_context
- rec_type_id = { class_ident & id_info = type_id_info}
+
+ dictionary_record_name = class_ident.id_name+++";";
+ rec_type_id = { id_name = dictionary_record_name, id_info = type_id_info }
class_dictionary = { ds & ds_ident = rec_type_id }
{ index_type, index_cons, index_selector } = indexes
@@ -1414,7 +1416,8 @@ where
[ field_type \\ i <- [1..nr_of_members] ] class_defs modules var_heap symbol_table
(cons_id_info, symbol_table) = newPtr EmptySymbolTableEntry symbol_table
- rec_cons_id = { class_ident & id_info = cons_id_info}
+ rec_cons_id = { id_name = dictionary_record_name, id_info = cons_id_info }
+
cons_symbol = { ds_ident = rec_cons_id, ds_arity = nr_of_fields, ds_index = index_cons }
(cons_type_ptr, var_heap) = newPtr VI_Empty var_heap