X-Git-Url: http://deadsoftware.ru/gitweb?p=dsw-obn.git;a=blobdiff_plain;f=src%2Foberon.c;h=58eb67c3eb72562294074f972fde2e15f68b5fec;hp=e4b9157d151cafa6075c86bbc1a07ebf2e845bef;hb=55d9ee92b95dd306ac80fb643ed21d3b733395d7;hpb=3edc4e955c943735543e2c94ecd28f94d75b32fb diff --git a/src/oberon.c b/src/oberon.c index e4b9157..58eb67c 100644 --- a/src/oberon.c +++ b/src/oberon.c @@ -1223,13 +1223,21 @@ oberon_autocast_call(oberon_context_t * ctx, oberon_item_t * desig) { 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; }