Mercurial > octave
view test/bug-51532/bug-51532.tst @ 23838:6e0fd7e3c262
Fix argument lookup in '+' package functions (Bug #51532).
* pt-eval.cc (tree_evaluator::visit_index_expression): Check to see if the
expression is a package. If it is, then indexing_object should be false.
* ov.h, ov-base.h, ov-classdef.cc (is_package): New method for checking if
object is a package. It passes information from cdef_meta_object.
* test/module.mk, test/bug-51532/module.mk, test/+package_bug51532/foo.m,
test/bug-51532.tst: Added test for the bug.
author | Piotr Held <pjheld@gmail.com> |
---|---|
date | Mon, 07 Aug 2017 15:05:19 -0700 |
parents | |
children | 194eb4bd202b |
line wrap: on
line source
## Copyright (C) 2017 Piotr Held ## ## This file is part of Octave. ## ## Octave is free software; you can redistribute it and/or modify it ## under the terms of the GNU General Public License as published by ## the Free Software Foundation; either version 3 of the License, or ## (at your option) any later version. ## ## Octave is distributed in the hope that it will be useful, but ## WITHOUT ANY WARRANTY; without even the implied warranty of ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ## GNU General Public License for more details. ## ## You should have received a copy of the GNU General Public License ## along with Octave; see the file COPYING. If not, see ## <http://www.gnu.org/licenses/>. ## Test for value returned from a +package function %!test %! r = package_bug51532.foo ("asdf"); %! assert (ischar (r)); %! assert (r, "asdf");