[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #48802] function overload resolution on functi
From: |
Kai Torben Ohlhus |
Subject: |
[Octave-bug-tracker] [bug #48802] function overload resolution on function handles fails on classdef methods defined in class body |
Date: |
Wed, 20 Feb 2019 05:36:30 -0500 (EST) |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.109 Safari/537.36 |
Follow-up Comment #5, bug #48802 (project octave):
Regarding comment #3: In the original example I get:
% ML18 (error): The class c2 has no Constant property or Static method named
'm1_h'.
% OCT6 (error): method `m1_h' is not static
m1_fh = c2.m1_h ();
% ML18 (error): The class c2 has no Constant property or Static method named
'sin_h'.
% OCT6 (error): method `sin_h' is not static
sin_fh = c2.sin_h ();
Changing all methods to be static in c2 the output of run_test.m:
>> c1_obj = c1 ();
>> c2_obj = c2 ();
>> m1_fh = c2.m1_h ();
>> sin_fh = c2.sin_h ();
>> m1_fh (pi) %% m1 or error from c2:m1 about wrong type?
m1
3.1416
>> m1_fh (c2_obj) %% c2:m1, I assume
m1
c2 with no properties.
>> m1_fh (c1_obj) %% c1:m1, or error from c2:m1 about wrong type?
c1:m1
>> sin_fh (pi) %% built-in sin or error from c2:sin about wrong type?
ans =
1.2246e-16
>> sin_fh (c2_obj) %% c2:sin, I assume
Undefined function 'sin' for input arguments of type 'c2'.
>> fh = @sin;
>> fh (pi) %% built-in sin, I assume.
ans =
1.2246e-16
>> fh (c2_obj) %% c2:sin or error from built-in sin about wrong type?
Undefined function 'sin' for input arguments of type 'c2'.
Test follows in the next post.
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?48802>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/