From b0c6920e748e3b679f4fc5e1b29b0cfd8436c66f Mon Sep 17 00:00:00 2001 From: Lawrence Date: Thu, 9 Apr 2020 18:22:40 -0400 Subject: [PATCH] parseConstrained now allows SoftLinks Since it's nigh impossible for SoftLinks to validate themselves, we (for now) simply allow them access. --- +types/+util/parseConstrained.m | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/+types/+util/parseConstrained.m b/+types/+util/parseConstrained.m index 5437f331..20463e76 100644 --- a/+types/+util/parseConstrained.m +++ b/+types/+util/parseConstrained.m @@ -3,7 +3,17 @@ ikeys = false(size(varargin)); defprops = properties(obj); for i=1:2:length(varargin) - ikeys(i) = isa(varargin{i+1}, type) && ~any(strcmp(varargin{i}, defprops)); + if any(strcmp(varargin{i}, defprops)) + continue; + end + + arg = varargin{i+1}; + if isa(arg, 'types.untyped.ExternalLink') + ikeys(i) = isa(arg.deref(), type); + continue; + end + + ikeys(i) = isa(arg, type) || isa(arg, 'types.untyped.SoftLink'); end ivals = circshift(ikeys,1); if any(ikeys)