# HG changeset patch # User John W. Eaton # Date 1626888346 14400 # Node ID ef865fcd4611ed354bcc60910dcc21aa6924434e # Parent 3cb8519fed0f73c361291342586e0a90f8620fc4 don't check status of symbol as variable when parsing at top level (bug #60882) * lex.ll (base_lexer::handle_identifier): Don't check whether identifier is a top-level variable. Matlab apparently doesn't check either, so the behavior is the same whether at the command line or in a function or script. diff -r 3cb8519fed0f -r ef865fcd4611 libinterp/parse-tree/lex.ll --- a/libinterp/parse-tree/lex.ll Wed Jul 21 18:51:54 2021 +0200 +++ b/libinterp/parse-tree/lex.ll Wed Jul 21 13:25:46 2021 -0400 @@ -3568,9 +3568,7 @@ || ident == "I" || ident == "i" || ident == "J" || ident == "j" || ident == "Inf" || ident == "inf" - || ident == "NaN" || ident == "nan" - || (m_interpreter.at_top_level () - && m_interpreter.is_variable (ident)))) + || ident == "NaN" || ident == "nan")) tok->mark_may_be_command (); push_token (tok);