]> ocean-lang.org Git - ocean/blobdiff - csrc/oceani.mdc
oceani: mark structure return from functions as not supported.
[ocean] / csrc / oceani.mdc
index 96fe6c6d6922d82c89de66d37ce0375667a02f04..12beeb2c71952315a6373ec17407c15a1dcf6738 100644 (file)
@@ -4845,6 +4845,11 @@ is a bit more interesting at this level.
                                                v->type->function.return_type, 0);
                        if (!ok)
                                all_ok = 0;
+                       if (!v->type->function.return_type->dup) {
+                               type_err(c, "error: function cannot return value of type %1", 
+                                        v->where_decl, v->type->function.return_type, 0, NULL);
+                       }
+
                        v->type->function.local_size = scope_finalize(c);
                }
                return all_ok;