bugGNU Octave - Bugs: bug #49409, Undefined var from subclass

 
 

bug #49409: Undefined var from subclass

Submitted by:  Ll <pipeng>
Submitted on:  Fri 21 Oct 2016 09:41:00 PM UTC  
 
Category: InterpreterSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Incorrect Result
Status: Works For MeAssigned to: None
Originator Name: Open/Closed: Closed
Release: devOperating System: GNU/Linux

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Sat 22 Oct 2016 05:35:25 PM UTC, comment #2:

Ups you are right, sorry waste your time, i need take care more attention to this details.

Thx. Cya.

Ll <pipeng>
Sat 22 Oct 2016 05:09:26 PM UTC, comment #1:

Doesn't the error here just mean that you called B with only 1 argument? You need either a default value

or to check the value of nargin

If you fix that is there still a bug here?

Mike Miller <mtmiller>
Project Administrator
Fri 21 Oct 2016 09:41:00 PM UTC, original submission:

Hi, well this is a Matlab example:
pipe@Hi ~/Documentos/Cosas/octave/classes $ cat @A/A.m
classdef A
properties
x
y
end
methods
function obj = A(x)
obj.x = x;
end
end
end
pipe@Hi ~/Documentos/Cosas/octave/classes $ cat @B/B.m
classdef B < A
methods
function obj = B(x,y)
obj@A(x);
obj.y = y;
end
end
end

and from octave

octave:3> B(2)
error: 'y' undefined near line 5 column 18
error: called from
B at line 5 column 16

Thx. Cya.

Ll <pipeng>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by mtmiller (Posted a comment)
  • -unavailable- added by pipeng (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sat 22 Oct 2016 05:39:46 PM UTCmtmillerOpen/ClosedOpen=>Closed
    Sat 22 Oct 2016 05:09:26 PM UTCmtmillerCategoryNone=>Interpreter
      Item GroupNone=>Incorrect Result
      StatusNone=>Works For Me

    Back to the top


    Powered by Savane 3.1-cleanup1