[bug #68172] any() and all() should work only on numeric or logical args

Markus Mützel <[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.

Update of bug #68172 (group octave):

                Category:                    None => Interpreter
                  Status:                    None => Ready For Test
         Planned Release:                    None => 12.1.0 (current default)

    _______________________________________________________

Follow-up Comment #11:

I agree that addressing the issue at the level that you proposed is probably
the best way forward.

I went ahead and added a warning to the virtual functions on the stable branch
which will be throwing errors with your change (hg id 0559a512a5df). That
change is small (and therefore probably not very risky). These new warnings
are triggering for most non-numeric and non-logical input. But they don't
trigger for cell input. It might be nice to also emit a warning in that case
on the stable branch if that isn't to difficult.
That change also adds a note to the NEWS.11.md file that announces the
upcoming change in behavior.

With that, I pushed your change to the default branch on top of that (hg id
4d4d4a4f0a6f).

I added tests using function handles to your patch. While doing that, I
noticed that we currently don't support creating arrays of function handles.
The error looks odd to me:

octave:1> [@disp, @plot]
error: octave_base_value::resize (): wrong type argument 'function handle'
octave:2>


Maybe, the necessary changes to support that are similar to what you did to
support arrays of classdef objects. If you like, maybe you could take a look
at that, too.

Anyway, that isn't related to this report.

Marking as ready for test.



    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?68172>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
signature.asc (application/pgp-signature, 228 B)
-----BEGIN PGP SIGNATURE-----

iHUEABYIAB0WIQQk97aszIMMAvLLwm6qLAuaBUf3TgUCac/zQwAKCRCqLAuaBUf3
TgPqAP9bjYBIyNUlfTyiaX5fSJpQIpMKDEyIteH0jGOqPGIqpAEAmZczwoOhF2mL
8QVkt11kpW7QfaeFQ4tL483Epx4v1Ak=
=6Zwp
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.