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

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

[Octave-bug-tracker] [bug #61673] classdef - (Access = hidden) results i


From: Markus Mützel
Subject: [Octave-bug-tracker] [bug #61673] classdef - (Access = hidden) results in spurious figure window
Date: Wed, 15 Dec 2021 11:07:41 -0500 (EST)
User-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36 Edg/96.0.1054.53

Follow-up Comment #6, bug #61673 (project octave):

I tested with the following class in Matlab R2021a:

classdef testclassdef
  
  methods (Access = public)
    function this = testclassdef (varargin)
      a = 1;
    end
  end
  
  methods (Access = hidden)
    function this = say_hello(this)
      disp('hello');
    end
  end
  
end


An object of that class can be created. But an error is thrown when trying to
access that method:

>> t = testclassdef
Error using testclassdef
Error: File: testclassdef.m Line: 9 Column: 21
'Access' must be public, protected, private or a list of classes.  For more
information, see Specify Access to Class Members.


Btw, the error message in Matlab could be more specific. Afaict, `Access` can
be set to `public`, `protected`, `private`, or a cell array of meta-classes
(like `{?testclassdef2}`).


    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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