aboutsummaryrefslogtreecommitdiff
path: root/frontend/checktypes.icl
diff options
context:
space:
mode:
authormartinw2001-05-11 09:24:15 +0000
committermartinw2001-05-11 09:24:15 +0000
commit4c58218a624b9f66d3ec006477d1560517be5450 (patch)
treecd22b4ae4e01b4443bf32c45fb03696f8460a250 /frontend/checktypes.icl
parentchecking the kinds of all function-, instance-, class- and member-types (diff)
improving error message
git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@425 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d
Diffstat (limited to 'frontend/checktypes.icl')
-rw-r--r--frontend/checktypes.icl5
1 files changed, 4 insertions, 1 deletions
diff --git a/frontend/checktypes.icl b/frontend/checktypes.icl
index b760013..1c189af 100644
--- a/frontend/checktypes.icl
+++ b/frontend/checktypes.icl
@@ -1,7 +1,8 @@
implementation module checktypes
import StdEnv
-import syntax, checksupport, check, typesupport, utilities //, RWSDebug
+import syntax, checksupport, check, typesupport, utilities,
+ compilerSwitches //, RWSDebug
:: TypeSymbols =
@@ -863,6 +864,8 @@ checkTypeContext mod_index tc=:{tc_class=tc_class=:{glob_object=class_name=:{ds_
where
check_context_types tc_class [] cs=:{cs_error}
= { cs & cs_error = checkError tc_class "type context should contain one or more type variables" cs_error}
+ check_context_types tc_class [((CV {tv_name}) :@: _):_] cs=:{cs_error}
+ = { cs & cs_error = checkError tv_name "not allowed as higher order type variable in context" cs_error}
check_context_types tc_class [TV _ : types] cs
= cs
check_context_types tc_class [type : types] cs