Skip to content

Commit

Permalink
parseConstrained now allows SoftLinks
Browse files Browse the repository at this point in the history
Since it's nigh impossible for SoftLinks to validate themselves, we (for now)
simply allow them access.
  • Loading branch information
Lawrence committed Apr 13, 2020
1 parent 6a6b8d9 commit b0c6920
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion +types/+util/parseConstrained.m
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit b0c6920

Please sign in to comment.