On Tue, Apr 03, 2018 at 12:32:10 +0100, Richard Crozier wrote:
Matlab supports restricting classdef classes method access to a list of
other classes, see:
https://uk.mathworks.com/help/matlab/matlab_oop/selective-access-to-class-methods.html
In a (fairly old, 4.1.0+) dev version I am using this does not appear to be
present in Octave. I attach and example/test case. Should I submit a bug
report?
In the example, running test_octave_method_access_control.m should display
'Access granted' on the command line (and does so in Matlab R2016b). In
Octave it results in the error:
error: invalid property/method access in class `testMethodAccess1'
If you change the syntax from
methods (Access = ?testMethodAccess2)
to
methods (Access = {?testMethodAccess2})
then it works in Octave.
I think you should file a bug report for the missing Matlab
compatibility.