changeset 25099:daff5efe062f stable

allow creation of handles to nested functions (bug #39257) * ov-fcn-handle.cc (octave_fcn_handle::octave_fcn_handle): Don't error for a handles to nested functions. * nest.tst: Mark nested function handle test as a fixed bug.
author John W. Eaton <jwe@octave.org>
date Tue, 03 Apr 2018 08:14:48 -0400
parents 5dce8aa80652
children b8ffceb06354 29641449ca90
files libinterp/octave-value/ov-fcn-handle.cc test/nest/nest.tst
diffstat 2 files changed, 1 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/libinterp/octave-value/ov-fcn-handle.cc	Mon Apr 02 17:39:58 2018 -0700
+++ b/libinterp/octave-value/ov-fcn-handle.cc	Tue Apr 03 08:14:48 2018 -0400
@@ -92,9 +92,6 @@
       if (uf_scope)
         uf_scope.cache_name (nm);
     }
-
-  if (uf && uf->is_nested_function () && ! uf->is_subfunction ())
-    error ("handles to nested functions are not yet supported");
 }
 
 octave_value_list
--- a/test/nest/nest.tst	Mon Apr 02 17:39:58 2018 -0700
+++ b/test/nest/nest.tst	Tue Apr 03 08:14:48 2018 -0400
@@ -60,7 +60,7 @@
 %! assert (f("foo"), "nested foo");
 %! assert (f("foo"), "nested foo");
 
-%!test <39257>
+%!test <*39257>
 %! f = no_closure (1);
 %! assert (f(), "nested");
 %! assert (f("foo"), "nested foo");