aboutsummaryrefslogtreecommitdiff
path: root/frontend
diff options
context:
space:
mode:
authorronny2001-07-27 11:48:51 +0000
committerronny2001-07-27 11:48:51 +0000
commitc3b9743f87e59d6fc8d354f2de379ab47affa338 (patch)
tree56084cef4c094976fd5645e0d1cc2a8d8ef17cc1 /frontend
parentThis commit was generated by cvs2svn to compensate for changes in r595, (diff)
patch to prevent crash with undefined type variabeles in special declaration
git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@597 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d
Diffstat (limited to 'frontend')
-rw-r--r--frontend/check.icl16
1 files changed, 16 insertions, 0 deletions
diff --git a/frontend/check.icl b/frontend/check.icl
index fe7ed0c..0482532 100644
--- a/frontend/check.icl
+++ b/frontend/check.icl
@@ -473,6 +473,22 @@ where
build_type_subst {bind_src,bind_dst} type_heaps
# (_, bind_src, type_heaps) = substitute bind_src type_heaps
+// RWS ...
+/*
+ FIXME: this is a patch for the following incorrect function type (in a dcl module)
+
+
+ f :: a | c a b special
+ a=[], b = Int
+ a=T, b = Char
+
+ The type variable b doesn't occur in f's type, but this is checked in a later
+ phase. Probably it's a better solution to change the order of checking.
+
+*/
+ | isNilPtr bind_dst.tv_info_ptr
+ = type_heaps
+// ... RWS
= { type_heaps & th_vars = writePtr bind_dst.tv_info_ptr (TVI_Type bind_src) type_heaps.th_vars}
build_var_subst var (free_vars, type_var_heap)