DEADSOFTWARE

Запрещён возврат массива или записи функцией
[dsw-obn.git] / src / oberon.c
index 36736a4bf9384333eb1226c1b6835f202cdabab1..59a5c3d5fa7f6f11dc9e65e6b1974f59fca12770 100644 (file)
@@ -2444,6 +2444,11 @@ oberon_formal_pars(oberon_context_t * ctx, oberon_type_t * signature)
                {
                        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;
        }
 }