diff --git a/src/oberon.c b/src/oberon.c
index 36736a4bf9384333eb1226c1b6835f202cdabab1..f67d3927dfdb0d72cbd620aeea0f4f606901376b 100644 (file)
--- a/src/oberon.c
+++ b/src/oberon.c
{
oberon_error(ctx, "function result is not type");
}
+ if(typeobj -> type -> class == OBERON_TYPE_RECORD
+ || typeobj -> type -> class == OBERON_TYPE_ARRAY)
+ {
+ oberon_error(ctx, "records or arrays could not be result of function");
+ }
signature -> base = typeobj -> type;
}
}
oberon_assert_token(ctx, ELSE);
oberon_statement_seq(ctx);
}
+ else
+ {
+ oberon_generate_trap(ctx, -1);
+ }
oberon_generate_label(ctx, end);
oberon_assert_token(ctx, END);
oberon_assert_token(ctx, ELSE);
oberon_statement_seq(ctx);
}
+ else
+ {
+ oberon_generate_trap(ctx, -2);
+ }
oberon_generate_label(ctx, end);
oberon_assert_token(ctx, END);