[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #59602] incorrect "not a direct superclass" er
From: |
Ray Zimmerman |
Subject: |
[Octave-bug-tracker] [bug #59602] incorrect "not a direct superclass" error |
Date: |
Wed, 2 Dec 2020 15:31:30 -0500 (EST) |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.0.1 Safari/605.1.15 |
URL:
<https://savannah.gnu.org/bugs/?59602>
Summary: incorrect "not a direct superclass" error
Project: GNU Octave
Submitted by: rdzman
Submitted on: Wed 02 Dec 2020 08:31:28 PM UTC
Category: Interpreter
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: Unexpected Error or Warning
Status: None
Assigned to: None
Originator Name:
Originator Email:
Open/Closed: Open
Release: 6.0.90
Discussion Lock: Any
Operating System: Mac OS
_______________________________________________________
Details:
Given the following two classes ...
classdef classA < classB
properties
a = @classB;
end
methods
function obj = classA()
obj@classB();
end
end
end
classdef classB < handle
end
... attempting to instantiate *classA* in a fresh Octave session results in
the following error:
octave:1> a = classA
error: 'classB' is not a direct superclass of 'classA'
error: called from
classA at line 7 column 13
While it produces this error consistently in a fresh Octave session, the code
does sometimes work fine, depending on previous activity in the Octave
session. For example, the following is also repeatable for me in a fresh
Octave session:
octave:1> b = @classB
b = @classB
octave:2> a = classA
a =
classA object with properties:
a: [1x1 function_handle]
In my tests on previous versions (e.g. 5.2.0, 5.1.0, 4.4.1) I was not able to
reproduce the error. In 6.0.09 the error seems to be related to the
initialization of the property a in classA. Initializing it with a different
value also eliminates the error.
Very strange ... this bug was causing nondeterministic results from the test
suite for my own code, and it took me hours to boil it down to this MWE.
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?59602>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [Octave-bug-tracker] [bug #59602] incorrect "not a direct superclass" error,
Ray Zimmerman <=
- [Octave-bug-tracker] [bug #59602] incorrect "not a direct superclass" error, Ray Zimmerman, 2020/12/02
- [Octave-bug-tracker] [bug #59602] incorrect "not a direct superclass" error, Ray Zimmerman, 2020/12/02
- [Octave-bug-tracker] [bug #59602] incorrect "not a direct superclass" error, Rik, 2020/12/02
- [Octave-bug-tracker] [bug #59602] incorrect "not a direct superclass" error, Ray Zimmerman, 2020/12/02
- [Octave-bug-tracker] [bug #59602] incorrect "not a direct superclass" error, Rik, 2020/12/03
- [Octave-bug-tracker] [bug #59602] incorrect "not a direct superclass" error, Rik, 2020/12/03
- [Octave-bug-tracker] [bug #59602] incorrect "not a direct superclass" error, Rik, 2020/12/03
- [Octave-bug-tracker] [bug #59602] incorrect "not a direct superclass" error, Ray Zimmerman, 2020/12/07
- [Octave-bug-tracker] [bug #59602] incorrect "not a direct superclass" error, Rik, 2020/12/07