bugGNU Octave - Bugs: bug #50395, subclassing a class that is also...

 
 

bug #50395: subclassing a class that is also defined as a variable fails

Submitter:  A.R. Burgers <arb>
Submitted:  Fri 24 Feb 2017 10:29:35 PM UTC
   
 
Category:  Classdef Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Fixed Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * dev Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Tue 30 Jan 2024 10:11:33 PM UTC, comment #3: 

Marking as fixed and closing report.

Rik <rik5>
Group administrator
Fri 26 Jan 2024 03:18:48 PM UTC, comment #2: 

I'm also unable to recreate anything like what @arb reported using
a current stable build. creating a new object a seems to work even if c is defined as a variable, anonymous function, etc.

Nicholas Jankowski <nrjank>
Group Member
Thu 25 Jan 2024 08:54:55 PM UTC, comment #1: 

As far as I can tell, this problem has been fixed at some point.  I don't see the problem with the current development sources or version 8.4.

I added a test in the following changeset:

http://hg.savannah.gnu.org/hgweb/octave/rev/917e72ee8cbb

Marking as ready for test.  Could someone verify that the new test is actually testing the correct thing?  I tested initially with the original example but changed variable and class names in my changeset to match our conventions for classdef tests.

John W. Eaton <jwe>
Group administrator
Fri 24 Feb 2017 10:29:35 PM UTC, original submission:  

consider class c


classdef c
end


and class a, subclassing c:


classdef a < c
    methods
        function obj = a()
            disp('a instance created');
        end
    end
end


Then the following script:


a_i = a();

clear all
c = 3;
a_i = a();


produces this:

-verbatim-
a instance created
error: class not found: c


on the second instantiation it reports the "class not found" error

A.R. Burgers <arb>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by nrjank (Posted a comment)
  • -email is unavailable- added by jwe (Posted a comment)
  • -email is unavailable- added by arb (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2024-01-30 rik5 StatusReady For Test Fixed
        Open/ClosedOpen Closed
    2024-01-25 jwe CategoryInterpreter Classdef
        StatusNone Ready For Test

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code