comparison test/parser.tst @ 16755:787168f5f858

tag symbols in indexed assignments as variables (bug #39240) * pt-arg-list.cc (tree_argument_list::variable_names): Also return the symbol names from index expressions. * parser.tst: New test.
author John W. Eaton <jwe@octave.org>
date Wed, 12 Jun 2013 10:50:29 -0400
parents 1af8d21608b7
children 1e1d42f0f332
comparison
equal deleted inserted replaced
16754:022dba56de1e 16755:787168f5f858
255 255
256 %!test 256 %!test
257 %! R = @(rot) [cos(rot) -sin(rot); sin(rot) cos(rot)]; 257 %! R = @(rot) [cos(rot) -sin(rot); sin(rot) cos(rot)];
258 %! assert (R(pi/2), [cos(pi/2), -sin(pi/2); sin(pi/2),cos(pi/2)]); 258 %! assert (R(pi/2), [cos(pi/2), -sin(pi/2); sin(pi/2),cos(pi/2)]);
259 259
260 ## Check that xyz is tagged as a variable in the parser. Both
261 ## expressions must remain on one line for this test to work as
262 ## intended.
263 %!test
264 %! xyz(1) = 1; xyz /= 1;
265 %! assert (xyz, 1);