changeset 23637:2208cc0e89a3

don't create tree_function_def objects for local functions in classdef files * oct-parse.in.yy (base_parser::finish_function): Don't create tree_function_def objects for local functions in classdef files.
author John W. Eaton <jwe@octave.org>
date Sat, 17 Jun 2017 20:34:49 -0400
parents 563a9fc1ef23
children 799833716c7b
files libinterp/parse-tree/oct-parse.in.yy
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libinterp/parse-tree/oct-parse.in.yy	Sat Jun 17 17:41:40 2017 -0700
+++ b/libinterp/parse-tree/oct-parse.in.yy	Sat Jun 17 20:34:49 2017 -0400
@@ -3438,7 +3438,7 @@
         else if (curr_fcn_depth == 1)
           fcn_scope->update_nest ();
 
-        if (! lexer.reading_fcn_file && curr_fcn_depth == 1)
+        if (! (lexer.reading_classdef_file || lexer.reading_fcn_file))
           {
             // We are either reading a script file or defining a function
             // at the command line, so this definition creates a