raise exception if declared (OCL-) context ist not correct with respect to the model

git-svn-id: https://projects.brucker.ch/su4sml/svn/su4sml/trunk@8235 3260e6d1-4efc-4170-b0a7-36055960796d
This commit is contained in:
Achim D. Brucker 2008-07-16 22:36:43 +00:00
parent 6ac9a2077f
commit 5397e3e5ab
1 changed files with 6 additions and 2 deletions

View File

@ -714,7 +714,9 @@ fun check_context (Cond (path,op_name,op_sign,result_type,cond,pre_name,expr)) (
then
(SOME((Cond (path,op_name,op_sign,(#result oper),cond,pre_name,resolve_OclTerm expr model))))
else
NONE
(* NONE *)
raise TC_WrongContextChecked (Cond (path,op_name,op_sign,result_type,cond,pre_name,expr))
val _ = trace function_ends ("TypeChecker.check_context Cond(...)\n\n\n")
in
res
@ -738,7 +740,9 @@ fun check_context (Cond (path,op_name,op_sign,result_type,cond,pre_name,expr)) (
(SOME ((Attr (path,(#attr_type attr),attrorassoc,resolve_OclTerm expr model))))
end
else
NONE
(* NONE *)
raise TC_WrongContextChecked (Attr (path,typ,attrorassoc,expr))
val _ = trace function_ends ("TypeChecker.check_context\n\n\n")
in
res