Mercurial > jwe > octave
changeset 27070:9cf1a1732201
Map.m: Silence unnecessary warning about "Octave:empty-index" (bug #56203).
* Map.m (subsref): Determine if subsref is actually calling a method of Map
object and don't do indexing in this case.
author | Guillaume Flandin <guillaume.offline@gmail.com> |
---|---|
date | Wed, 24 Apr 2019 08:28:59 -0700 |
parents | 2fd1ee5574d7 |
children | 2cede23e44c3 |
files | scripts/+containers/Map.m |
diffstat | 1 files changed, 3 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/+containers/Map.m Wed Apr 24 08:10:33 2019 -0700 +++ b/scripts/+containers/Map.m Wed Apr 24 08:28:59 2019 -0700 @@ -376,6 +376,9 @@ otherwise error ("containers.Map: unknown property '%s'", s(1).subs); endswitch + if (numel (s) > 1 && strcmp (s(2).type, "()") && isempty (s(2).subs)) + s(1) = []; + endif case "()" if (isempty (s(1).subs)) error ("containers.Map: no key specified");