[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #52989] classdef: missing error messages on mu
From: |
A.R. Burgers |
Subject: |
[Octave-bug-tracker] [bug #52989] classdef: missing error messages on multiply defined properties |
Date: |
Sat, 27 Jan 2018 17:34:26 -0500 (EST) |
User-agent: |
Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:57.0) Gecko/20100101 Firefox/57.0 |
URL:
<http://savannah.gnu.org/bugs/?52989>
Summary: classdef: missing error messages on multiply defined
properties
Project: GNU Octave
Submitted by: arb
Submitted on: Sat 27 Jan 2018 10:34:25 PM UTC
Category: Interpreter
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: Missed Error or Warning
Status: None
Assigned to: None
Originator Name:
Originator Email:
Open/Closed: Open
Discussion Lock: Any
Release: dev
Operating System: Any
_______________________________________________________
Details:
octave happily parses this class:
classdef zz2
properties
p1
p1
end
properties (Dependent)
p1
end
methods
function val = f(obj)
val = 'f';
end
end
end
A side effect of the multiply defined properties is that method f can not be
found: the next script
zz2_i = zz2;
f = zz2_i.f
gives this error message:
error: subsref: unknown method or property: f
error: called from
run_zz2 at line 2 column 3
Also octave allows the same property name in a class and a superclass:
classdef zz < zzs
properties
p1 = 2;
end
end
classdef zzs
properties
p1 = 1;
end
end
which results on execution of this script
zz_i = zz;
p1 = zz_i.p1
in
p1 = 2
Is the case for both stable and dev.
I didn't find this reported in an earlier bug report, but can hardly imagine
this has gone unnoticed to date.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?52989>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Octave-bug-tracker] [bug #52989] classdef: missing error messages on multiply defined properties,
A.R. Burgers <=