diff --git a/src/oberon.c b/src/oberon.c
index e4b9157d151cafa6075c86bbc1a07ebf2e845bef..58eb67c3eb72562294074f972fde2e15f68b5fec 100644 (file)
--- a/src/oberon.c
+++ b/src/oberon.c
{
if(param -> class == OBERON_CLASS_VAR_PARAM)
{
+ if(arg -> result != param -> type)
+ {
+ oberon_error(ctx, "incompatible type");
+ }
if(arg -> read_only)
{
oberon_error(ctx, "assign to read-only var");
}
+ casted[i] = arg;
+ }
+ else
+ {
+ casted[i] = oberon_autocast_to(ctx, arg, param -> type);
}
- casted[i] = oberon_autocast_to(ctx, arg, param -> type);
arg = arg -> next;
param = param -> next;
}