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

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

[Octave-bug-tracker] [bug #51534] Invoking parent class constructor in c


From: Piotr Held
Subject: [Octave-bug-tracker] [bug #51534] Invoking parent class constructor in child constructor fails
Date: Fri, 21 Jul 2017 20:05:53 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.86 Safari/537.36

URL:
  <http://savannah.gnu.org/bugs/?51534>

                 Summary: Invoking parent class constructor in child
constructor fails
                 Project: GNU Octave
            Submitted by: jsoh425
            Submitted on: Sat 22 Jul 2017 12:05:52 AM UTC
                Category: None
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Regression
                  Status: None
             Assigned to: None
         Originator Name: Piotr Held
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: dev
        Operating System: GNU/Linux

    _______________________________________________________

Details:

When invoking parent class constructor in child constructor the parent
constructor is not properly called.

For Parent Class:

classdef Parent_Class
  methods
    function self = Parent_Class(val)
      val;
    end
  end
end


And Child Class:

classdef Child_Class < Parent_Class
  methods
    function self = Child_Class(val)
      self = address@hidden(val);
    end
  end
end


When calling:

Child_Class('asd')


You get:

error: value on right hand side of assignment is undefined
error: called from
    Child_Class at line 4 column 12


Am attaching the test for this problem.





    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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