forked from swig/swig
-
Notifications
You must be signed in to change notification settings - Fork 19
Open
Description
#96 reinstated the subsref functions in Swigref.m. However, when running the test-suite with recent Octave, it generates lots of warnings like
warning: 'uint64 matrix' object indexed with empty index list
warning: called from
subsref at line 29 column 28
an example is generated at
| f = default_args.Foo(); |
This turns out to come from the following line in
SwigRef.m (generated here)
[varargout{1}] = builtin('subsref',self,substruct('.',s.subs,'()',{}));It is caused by the empty cell-array for (). The warning can be reproduced as follows
a.x=1;
subsref(a,substruct('.','x','()',{}))This does returns 1 but with the same warning (but is silent in MATLAB).
The simple solution seems to use
[varargout{1}] = builtin('subsref',self,substruct('.',s.subs));which has the desired effect
Metadata
Metadata
Assignees
Labels
No labels