[bug #67845] classdef constructors do not support multiple arguments
FatYoshi17 <[email protected]>
| Newsgroups | gmane.comp.gnu.octave.bugs |
|---|---|
| Message-ID | <[email protected]> |
Please use the bug tracker to post updates to a bug report. The mailing list is intended as a read-only notification stream. Info posted to this mailing list address won't appear in the tracker database where it is most useful.
Follow-up Comment #3, bug #67845 (group octave):
Hi, I’m attaching a patch that enables classdef constructors to return
multiple outputs, matching MATLAB behavior.
Previously, constructors with more than one declared output were rejected, and
constructor calls always forced nargout = 1, so additional outputs were not
returned.
This patch:
Allows constructors to declare multiple outputs (first output must still be
the object).
Propagates the caller’s nargout when dispatching constructor calls in
meta_subsref.
Adds a regression test (test/bug-67845.tst).
I verified the original reproducer, checked negative cases (non-object first
output errors as expected), and ran make check (FAIL 0).
Happy to revise if any changes are preferred.
(file #58293)
_______________________________________________________
Additional Item Attachment:
Name: 0001-classdef-support-constructors-with-multiple-outputs-.patch Size:
5.3KiB
<https://file.savannah.gnu.org/file/0001-classdef-support-constructors-with-multiple-outputs-.patch?file_id=58293>
AGPL NOTICE
These attachments are served by Savane. You can download the corresponding
source code of Savane at
https://savannah.gnu.org/source/savane-2a2ecc185bd672dd377a2efbb667431a4b30acc3.tar.gz
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?67845>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
signature.asc
(application/pgp-signature, 228 B)
-----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQQk97aszIMMAvLLwm6qLAuaBUf3TgUCaaR/6gAKCRCqLAuaBUf3 TjPGAP9ML6y+kTjhL1xEbtiMSaaJfyH0lVq/bpniHKnXdPQVlAD+Oz14vdUyBl0T pMdT7X6ooZz8qJVsuVCwNt4skq5aTw0= =FXC2 -----END PGP SIGNATURE-----