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

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

[Octave-bug-tracker] [bug #45444] Cannot access private functions inside


From: Kai Torben Ohlhus
Subject: [Octave-bug-tracker] [bug #45444] Cannot access private functions inside namespaces
Date: Mon, 24 Jan 2022 05:32:49 -0500 (EST)

Update of bug #45444 (project octave):

                  Status:                   Fixed => Confirmed              
             Open/Closed:                  Closed => Open                   
                 Summary: Private functions inside namespace and class
directories => Cannot access private functions inside namespaces

    _______________________________________________________

Follow-up Comment #18:

Agree to @muhali.  The following copy&paste example (from comment #0) still
fails in Octave 6.4.0, 7.0.91 and 8.0, but works with Matlab R2021a:


mkdir "./+foo/private";
f = fopen("./+foo/bar.m","wt");
fdisp (f, "function x = bar()");
fdisp (f, "    x = baz();");
fdisp (f, "endfunction");
fclose(f);
f = fopen("./+foo/private/baz.m","wt");
fdisp (f, "function x = baz()");
fdisp (f, "    x = pi();");
fdisp (f, "endfunction");
fclose(f);
foo.bar



error: 'baz' undefined near line 2, column 9
error: called from
    bar at line 2 column 7


This bug report took a bad strategy in reporting too many issues at the same
time.  The @class and classdef portion of this report is resolved.  The
+namespace part is still a problem.

Last point.  The given test suite of comment #8 is a gold mine:

https://github.com/amroamroamro/test_functions_scope

Partially confirmed that test suite with Matlab R2021a and should be
incorporated into Octave.

    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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