diff options
author | johnvg | 2005-11-01 15:33:59 +0000 |
---|---|---|
committer | johnvg | 2005-11-01 15:33:59 +0000 |
commit | 6a092328c016c9322bf6134bddb5db09457b635d (patch) | |
tree | ee1a6dfd3c89f9594175db37d75f12e094207dd6 /frontend/type.icl | |
parent | fix type error for correct programs using type synonyms with a type variable ... (diff) |
prevent crash in 'requirements_of_args' after
'checkError ("no generic instances of "..' in getSymbolType is called
git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@1556 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d
Diffstat (limited to 'frontend/type.icl')
-rw-r--r-- | frontend/type.icl | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/frontend/type.icl b/frontend/type.icl index 34d5db7..ab5dadc 100644 --- a/frontend/type.icl +++ b/frontend/type.icl @@ -1257,17 +1257,18 @@ getSymbolType pos ti=:{ti_common_defs} { symb_kind = SK_OverloadedFunction {glob # {me_ident, me_type,me_type_ptr} = ti_common_defs.[glob_module].com_member_defs.[glob_object] (fun_type_copy, ts) = determineSymbolTypeOfFunction pos me_ident n_app_args me_type me_type_ptr ti_common_defs ts = (fun_type_copy, [], ts) -// AA.. getSymbolType pos ti=:{ti_common_defs} symbol=:{symb_ident, symb_kind = SK_Generic gen_glob kind} n_app_args ts # (opt_member_glob, ts_generic_heap) = getGenericMember gen_glob kind ti_common_defs ts.ts_generic_heap # ts = { ts & ts_generic_heap = ts_generic_heap } = case opt_member_glob of No - # empty_tst = {tst_args=[], tst_arity=0, tst_lifted=0, tst_result={at_type=TE,at_attribute=TA_Multi}, tst_context=[], tst_attr_env=[]} - # ts_error = checkError ("no generic instances of " +++ toString symb_ident +++ " for kind") kind ts.ts_error + # empty_atype={at_type=TE,at_attribute=TA_Multi} + t_args=[empty_atype \\ _ <- [1..n_app_args]] + empty_tst = {tst_args=t_args, tst_arity=n_app_args, tst_lifted=0, tst_result=empty_atype, tst_context=[], tst_attr_env=[]} + ts_error = checkError ("no generic instances of " +++ toString symb_ident +++ " for kind") kind ts.ts_error -> (empty_tst, [], {ts & ts_error = ts_error}) - Yes member_glob -> getSymbolType pos ti {symbol & symb_kind = SK_OverloadedFunction member_glob} n_app_args ts -// ..AA + Yes member_glob + -> getSymbolType pos ti {symbol & symb_kind = SK_OverloadedFunction member_glob} n_app_args ts class requirements a :: !TypeInput !a !(!u:Requirements, !*TypeState) -> (!AType, !Optional ExprInfoPtr, !(!u:Requirements, !*TypeState)) |