octave-maintainers
[Top][All Lists]
Advanced

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

Re: Class method access control lists


From: Mike Miller
Subject: Re: Class method access control lists
Date: Sun, 8 Apr 2018 00:15:46 -0700
User-agent: Mutt/1.9.4 (2018-02-28)

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.

-- 
mike

Attachment: signature.asc
Description: PGP signature


reply via email to

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