Mercurial > jwe > octave
view test/bug-59704/bug-59704.tst @ 29321:09f99fe5190c stable
Fix ignored output from user function in left side of assignment (bug #59704).
* libinterp/parse-tree/pt-assign.cc (tree_multi_assignment::evaluate_n):
Set lvalue list of tree_evaluator only to process the right side of the
assignment. Reset it to null after that.
* test/bug-59704/bug59704_2.m, test/bug-59704/bug-59704.tst,
test/bug-59704/module.mk: Add new test case.
author | Fernando Alvarruiz <feralber@upvnet.upv.es> |
---|---|
date | Sun, 03 Jan 2021 20:48:09 +0100 |
parents | 67857e94604a |
children | 2838bbd84b87 |
line wrap: on
line source
%!test %! o = bug59704_1 (); %! o.test (); %! assert (o.p, []) %!test %! o = bug59704_2 (); %! [~, o(1)] = size (rand (2, 5)); %! assert (o(1), 5)