Add a New Comment (Rich Markup)
Comment Type & Canned Response: None None > Multiple Canned Responses Fixed in development Crash with no stack trace Already fixed in newer version Fixed in stable Bad description Bad description and crash Bad stack trace Obsolete version Duplicate and not fixed Duplicate and needs more info Duplicate and fixed Need info and old
Sorry forgot to mention, @jwe thanks for the quick fix.
I verified the failing example of the OP is now working properly in Octave 7.
Closing report.
No further comments, closing report.
Can this report be closed now?
I pushed the following changeset to fix the way we were handling "properties", "methods", "events", and "enumeration" as keywords in the parser:
http://hg.savannah.gnu.org/hgweb/octave/rev/ad1491462d13
This change was made on the default branch so will not appear in a released version of Octave until version 7.
Using the function 'properties' inside a classdef results in a parse error. The following class cannot be instanciated:
classdef PropFail properties some_prop end methods function props = failingMethod(instance) props = properties(instance); end end end
If I try to create an instance, the following happens:
octave> obj = PropFail() error: parse error near line 10 of file /home/oddan/gitted/source/mrst/mrst-other/ruden-geothermal/PropFail.m syntax error >>> props = properties(instance); ^
If, on the other hand, the 'properties' function is moved out of the lexical scope of the classdef, it works fine:
classdef PropWorks properties some_prop end methods function props = failingMethod(instance) props = getprops(instance); end end end function p = getprops(instance) p = properties(instance); end
I can create an instance of the latter without problem:
octave> obj = PropWorks() obj = PropWorks object with properties: some_prop: [0x0 double]
(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
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 project members can vote.
Please enter the title of George Orwell's famous dystopian book (it's a date):
Follow 5 latest changes.
Copyright © 2022 Free Software Foundation, Inc. Verbatim copying and distribution of this entire article is permitted in any medium, provided this notice is preserved. The Levitating, Meditating, Flute-playing Gnu logo is a GNU GPL'ed image provided by the Nevrax Design Team. Source Code
Powered by Savane 3.9