[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #54941] interpreter cannot find methods in fil
From: |
A.R. Burgers |
Subject: |
[Octave-bug-tracker] [bug #54941] interpreter cannot find methods in files of classdefs in packages |
Date: |
Fri, 2 Nov 2018 14:55:08 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36 Edge/16.16299 |
URL:
<https://savannah.gnu.org/bugs/?54941>
Summary: interpreter cannot find methods in files of
classdefs in packages
Project: GNU Octave
Submitted by: arb
Submitted on: Fri 02 Nov 2018 06:55:06 PM UTC
Category: Interpreter
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: Incorrect Result
Status: None
Assigned to: None
Originator Name:
Originator Email:
Open/Closed: Open
Discussion Lock: Any
Release: 4.4.1
Operating System: Any
_______________________________________________________
Details:
consider the hierarchy below with the same functions and methods and
definition for Myclass and pckg.Myclass.
./@Myclass/report_pi.m
./@Myclass/Myclass.m
./@Myclass/staticFunc1.m
./+pckg/@Myclass/report_pi.m
./+pckg/@Myclass/Myclass.m
./+pckg/@Myclass/staticFunc1.m
./test_Myclass.m
Executing test_Myclass.m with octave (stable and dev) gives this error
message
ver = 4.4.1
hg_id = 7a7c31b93216+
ans = 3
ans = 3.1416
ans = 3
error: subsref: unknown method or property: report_pi
the report_pi method is not found in package +pckg.
Remarkably the static function is found in both cases.
The function definitions are below:
function val = report_pi(obj)
val = pi;
end
function output = staticFunc1(arg1,arg2)
output = arg1 + arg2;
end
classdef Myclass
methods (Static)
output = staticFunc1(arg1,arg2)
end
end
% save script as test_Myclass.m
ver = version
hg_id = __octave_config_info__.hg_id
a = Myclass;
a.staticFunc1(1,2)
a.report_pi
b = pckg.Myclass;
b.staticFunc1(1,2)
b.report_pi
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?54941>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [Octave-bug-tracker] [bug #54941] interpreter cannot find methods in files of classdefs in packages,
A.R. Burgers <=