[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #51377] Parse error for abstract methods
From: |
Piotr Held |
Subject: |
[Octave-bug-tracker] [bug #51377] Parse error for abstract methods |
Date: |
Fri, 25 Aug 2017 19:15:01 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.78 Safari/537.36 |
Follow-up Comment #6, bug #51377 (project octave):
I wrote a new patch in the file simple_patch_bug51377.diff
This is a much simpler patch that only deals with this bug. It does not solve
the attribute validation problem, though I did add a FIXME about it in the
classdef creation code. I would be willing to write the attribute valiadion
inside ov-classdef.cc, however, that is not necessary for this problem to be
solved.
This patch does throw errors if you attempt to can create an instance of an
abstract class. That is an attribute validation problem and I wanted to keep
this patch as simple as possible.
Apart from fixing the bug, the only additional thing I did was refactoring
tree_classdef_attribute. Previously if an attribute was negated (e.g. 'methods
(~Abstract)') tree_classdef_attribute was designed to hold that information as
true (as in tree_classdef_attribute::negate = true). It seems more intuitive
to hold the value as false, since we are actually setting the value of the
attribute to false (in the refactored version:
tree_classdef_attribute::bool_value = false).
I also added a bunch of tests.
(file #41663)
_______________________________________________________
Additional Item Attachment:
File name: simple_patch_bug51377.diff Size:6 KB
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?51377>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/