octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #47680] classdef @ operator to overrided super


From: John W. Eaton
Subject: [Octave-bug-tracker] [bug #47680] classdef @ operator to overrided superclass methods
Date: Mon, 11 Feb 2019 16:35:39 -0500 (EST)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/60.0

Update of bug #47680 (project octave):

                  Status:               Confirmed => Ready For Test         

    _______________________________________________________

Follow-up Comment #19:

I pushed the following changesets related to this bug report to the default
branch.  These changes will appear in Octave 6.

http://hg.savannah.gnu.org/hgweb/octave/rev/606605d0cd31
http://hg.savannah.gnu.org/hgweb/octave/rev/17e7d310def8
http://hg.savannah.gnu.org/hgweb/octave/rev/9b0335f4bc74
http://hg.savannah.gnu.org/hgweb/octave/rev/91b152968ec1

With the last changeset above, Octave should handle both of the following
calls in the same way:


address@hidden (obj, ...)
address@hidden (...)


As far as I can tell, the superclass name can include package qualifiers but I
didn't add tests for that.

In comment #18, I showed the possibility of


address@hidden (...)


as possible.  But is it?  What is actually valid on the left of the '@' symbol
in a call to a superclass method?

Also, the Matlab docs say that the method name in the superclass reference
must match the name of the current function.  Does the object also have to be
the same object for which the current method is called?  For example:


% superclass.m:
classdef superclass
  methods
    function meth ()
      'foo-i-hithere'
    end
  end
end

% myclass.m:
classdef myclass < superclass
  methods
    function meth (obj)
      other_obj = myclass ();
      address@hidden ();
    end
  end
end

% code
x = myclass ();
x.meth ();


This code currently works in Octave, but maybe it should be an error?



    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?47680>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]