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

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

[Octave-bug-tracker] [bug #49169] overriding @super/class method, builti


From: Mike Miller
Subject: [Octave-bug-tracker] [bug #49169] overriding @super/class method, builtin class can't be called from @sub/sub constructor
Date: Tue, 27 Sep 2016 18:16:19 +0000 (UTC)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:49.0) Gecko/20100101 Firefox/49.0

Update of bug #49169 (project octave):

                Priority:              5 - Normal => 3 - Low                
              Item Group:                    None => Matlab Compatibility   
                 Release:                   4.0.3 => dev                    
        Operating System:               GNU/Linux => Any                    
                 Summary: Class can't be called from builtin function. =>
overriding @super/class method, builtin class can't be called from @sub/sub
constructor

    _______________________________________________________

Follow-up Comment #3:

Ok, so that error is specifically about a constructor using inheritance from
another object type that overrides the class method. I can confirm with a
minimum working example:


>> type @bar/bar

function b = bar ()
  b = class (struct (), "bar");
endfunction

>> type @bar/class

function class (x)
  error ("bar.class: this should not be called");
endfunction

>> type @foo/foo

function x = foo ()
  x.value = bar;
  x = class (x, "foo", bar);
endfunction

>> x = foo
error: bar.class: this should not be called
error: called from
    class at line 2 column 3
    foo at line 3 column 5



The override behavior seems to be fairly consistent with other methods in
Octave. It would be good to find out what Matlab does with an example like
this before we try to guess what the right behavior should be.



    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?49169>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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