Mercurial > octave
diff libinterp/parse-tree/pt-eval.cc @ 28525:286fe9352cd6 stable
Interpreter errors on unassigned inputs (bug #58686)
* libinterp/parse-tree/pt-eval.cc (tree_evaluator::convert_to_const_vector):
Throw a proper error instead of silently ignoring the undefined value.
* scripts/testfun/assert.m: Fix comparison of empty structures. Now that the
interpreter is stricter on unassigned inputs to functions.
* test/nest/nest.tst: Mark xtest, because the test never worked. Octave's test
framework got fooled by the interpreter.
author | Kai T. Ohlhus <k.ohlhus@gmail.com> |
---|---|
date | Thu, 02 Jul 2020 15:06:36 +0900 |
parents | 1be719d8b375 |
children | 1151ed869686 171a2857d6d1 |
line wrap: on
line diff
--- a/libinterp/parse-tree/pt-eval.cc Wed Jul 01 16:03:41 2020 +0900 +++ b/libinterp/parse-tree/pt-eval.cc Thu Jul 02 15:06:36 2020 +0900 @@ -1776,7 +1776,9 @@ for (octave_idx_type i = 0; i < tmp_ovl.length (); i++) args.push_back (tmp_ovl(i)); } - else if (tmp.is_defined ()) + else if (! tmp.is_defined ()) + error ("Element %d in argument list is not defined", k + 1); + else args.push_back (tmp); } else