[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #63186] function handle in constructor of a cl
From: |
Guillaume |
Subject: |
[Octave-bug-tracker] [bug #63186] function handle in constructor of a class |
Date: |
Sat, 8 Oct 2022 16:29:30 -0400 (EDT) |
URL:
<https://savannah.gnu.org/bugs/?63186>
Summary: function handle in constructor of a class
Project: GNU Octave
Submitter: gyom
Submitted: Sat 08 Oct 2022 08:29:28 PM UTC
Category: Interpreter
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: Unexpected Error or Warning
Status: None
Assigned to: None
Originator Name: Guillaume
Originator Email:
Open/Closed: Open
Release: dev
Discussion Lock: Any
Operating System: Any
_______________________________________________________
Follow-up Comments:
-------------------------------------------------------
Date: Sat 08 Oct 2022 08:29:28 PM UTC By: Guillaume <gyom>
If a function handle of a class is used in its constructor, the class seems to
be broken afterwards. I attach a slightly contrived example that reproduces
the issue:
++
>> s = classbug ("gnu octave");
>> s = classbug ({"gnu octave"});
>> s = classbug ("gnu octave");
error: no indexing!
error: called from
subsref at line 17 column 7
classbug at line 10 column 18
--
As you can see, after executing the second statement (that makes use of a
function handle to the class), the first statement doesn't execute properly
any more, with subsref() being called inappropriately. It works if "cellfun
('classbug',...)" is used instead of "cellfun (@classbug,...)".
_______________________________________________________
File Attachments:
-------------------------------------------------------
Date: Sat 08 Oct 2022 08:29:28 PM UTC Name: classbug.m Size: 486B By: gyom
<http://savannah.gnu.org/bugs/download.php?file_id=53817>
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?63186>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Octave-bug-tracker] [bug #63186] function handle in constructor of a class,
Guillaume <=