aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormartinw2001-03-02 15:11:34 +0000
committermartinw2001-03-02 15:11:34 +0000
commit106305dfa27094e6e99730b53f0ff8c036bc258f (patch)
tree190a131b383aca9e4e1d550bb76bd6f68167c048
parentbugfix for specialisations (diff)
bugfix: the compiler gave "index out of range" when an instance was declared
without the corresponding class being declared git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@317 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d
-rw-r--r--frontend/check.icl6
1 files changed, 4 insertions, 2 deletions
diff --git a/frontend/check.icl b/frontend/check.icl
index eca7d46..a06ac90 100644
--- a/frontend/check.icl
+++ b/frontend/check.icl
@@ -2134,12 +2134,14 @@ checkDclModule dcl_imported_module_numbers super_components imports_ikh componen
# (dcl_common, modules, hp_type_heaps, hp_var_heap, cs)
= checkCommonDefinitions cIsADclModule mod_index dcl_common modules hp_type_heaps hp_var_heap cs
+ heaps
+ = { heaps & hp_type_heaps = hp_type_heaps, hp_var_heap = hp_var_heap, hp_expression_heap=hp_expression_heap}
+ | not cs.cs_error.ea_ok
+ = ((0, 0, []), (expl_imp_info, modules, icl_functions, heaps, cs))
#!nr_of_members
= count_members mod_index dcl_common.com_instance_defs dcl_common.com_class_defs modules
# nr_of_dcl_functions_and_instances
= nr_of_dcl_functions+nr_of_members
- heaps
- = { heaps & hp_type_heaps = hp_type_heaps, hp_var_heap = hp_var_heap, hp_expression_heap=hp_expression_heap}
(nr_of_dcl_funs_insts_and_specs, rev_function_list, rev_special_defs, com_type_defs, com_class_defs, modules, heaps, cs)
= checkDclFunctions mod_index nr_of_dcl_functions_and_instances mod_defs.def_funtypes
dcl_common.com_type_defs dcl_common.com_class_defs modules heaps cs