octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #64057] assert.m: struct comparison skips type


From: Pantxo Diribarne
Subject: [Octave-bug-tracker] [bug #64057] assert.m: struct comparison skips type checking for field values
Date: Mon, 1 May 2023 15:21:27 -0400 (EDT)

Follow-up Comment #2, bug #64057 (project octave):

[(Erreur - Introuvable)]
My concern is that two bare variables that compare false in a base context,
due to type inconsistency, compare true when they are embedded in a struct.


assert (1, single (1)) ## -> error,  double != single
assert (struct ("num", 1), struct ("num", single (1))) ## -> ok, while value
types are still wrong


Again, this may be expected (e.g. for performance when traversing deeply
nested structures) but I just wanted to report it. At least now I know if I
care about type checking in structs, I should traverse all fields myself.
 



    _______________________________________________________

Reply to this item at:

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

_______________________________________________
Message posté via Savannah
https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]