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

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

[Octave-bug-tracker] [bug #56856] class method calls overloaded function


From: anonymous
Subject: [Octave-bug-tracker] [bug #56856] class method calls overloaded function instead of basic function
Date: Wed, 4 Sep 2019 04:11:12 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:68.0) Gecko/20100101 Firefox/68.0

URL:
  <https://savannah.gnu.org/bugs/?56856>

                 Summary: class method calls overloaded function instead of
basic function
                 Project: GNU Octave
            Submitted by: None
            Submitted on: Wed 04 Sep 2019 08:11:10 AM UTC
                Category: None
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Unexpected Error
                  Status: None
             Assigned to: None
         Originator Name: JD
        Originator Email: address@hidden
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 5.1.0
        Operating System: GNU/Linux

    _______________________________________________________

Details:

It seems that the dispatching of overloaded functions is overridden by the
presence of files in the current directory, even when the current folder is a
class folder.

In the attached example, a class 'test' is defined. This class has a 'size'
function, to be used for objects of type 'test'. But when a method of the
'test' class calls the 'size' function on an object of a different type,
Octave tries to use this class method 'test.size' on this object of a
different type, instead of the standard 'double.size' function. This results
in an unexpected error.

Calling the following two commands illustrates the problem with text outputs:
  a = test
  func(a)

This behavior clearly differs from Matlab's, and creates code which is
location-specific: a function can produce a different result if it is moved
into a different folder.



    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Wed 04 Sep 2019 08:11:10 AM UTC  Name: @test.tar.gz  Size: 479B   By:
None

<http://savannah.gnu.org/bugs/download.php?file_id=47447>

    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?56856>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

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