[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #65667] inputParser does not accept object wit
From: |
Tibor Auer |
Subject: |
[Octave-bug-tracker] [bug #65667] inputParser does not accept object with struct method as default value |
Date: |
Wed, 1 May 2024 13:39:21 -0400 (EDT) |
URL:
<https://savannah.gnu.org/bugs/?65667>
Summary: inputParser does not accept object with struct
method as default value
Group: GNU Octave
Submitter: tiborauer
Submitted: Wed 01 May 2024 05:39:21 PM UTC
Category: Octave Function
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: Unexpected Error or Warning
Status: None
Assigned to: None
Originator Name: Tibor Auer
Originator Email:
Open/Closed: Open
Release: 9.1.0
Discussion Lock: Any
Operating System: Any
Fixed Release: None
Planned Release: None
_______________________________________________________
Follow-up Comments:
-------------------------------------------------------
Date: Wed 01 May 2024 05:39:21 PM UTC By: Tibor Auer <tiborauer>
9.1.0 has updated parameter specification and replaced struct specification
field-by-field with calling the struct function (lines 365-370).
Unfortunately, it prevents me from specifying my custom class, which has a
struct method as a default parameter.
After some digging, I have found that it is due to the struct function, which
does not accept such class as a field value.
Minimum code:
testClass.m
classdef testClass
methods
function p = testClass ()
end
function s = struct(this)
s = 12;
end
end
end
>> c = testClass()
c =
testClass object with properties:
>> s = struct("p",c)
error: struct: function called with too many inputs
error: called from
struct
>> s.p = c
s =
scalar structure containing the fields:
p =
testClass object with properties:
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?65667>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [Octave-bug-tracker] [bug #65667] inputParser does not accept object with struct method as default value,
Tibor Auer <=
- [Octave-bug-tracker] [bug #65667] classdef calls overloaded function struct() rather than builtin struct(), Tibor Auer, 2024/05/04
- [Octave-bug-tracker] [bug #65667] classdef calls overloaded function struct() rather than builtin struct(), Philip Nienhuis, 2024/05/15
- [Octave-bug-tracker] [bug #65667] classdef calls overloaded function struct() rather than builtin struct(), Tibor Auer, 2024/05/15
- [Octave-bug-tracker] [bug #65667] classdef calls overloaded function struct() rather than builtin struct(), Tibor Auer, 2024/05/15
- [Octave-bug-tracker] [bug #65667] classdef calls overloaded function struct() rather than builtin struct(), Philip Nienhuis, 2024/05/15
- [Octave-bug-tracker] [bug #65667] classdef calls overloaded function struct() rather than builtin struct(), Rik, 2024/05/15
- [Octave-bug-tracker] [bug #65667] classdef calls overloaded function struct() rather than builtin struct(), Tibor Auer, 2024/05/16
- [Octave-bug-tracker] [bug #65667] classdef calls overloaded function struct() rather than builtin struct(), Nicholas Jankowski, 2024/05/16