[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #36217] New variables should be disallowed in
From: |
Max Brister |
Subject: |
[Octave-bug-tracker] [bug #36217] New variables should be disallowed in nested functions |
Date: |
Wed, 18 Apr 2012 03:53:24 +0000 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.162 Safari/535.19 |
Follow-up Comment #1, bug #36217 (project octave):
I now have a patch. It was not quite as simple to fix as I had hoped (is it
ever?). Anyways, the idea is
- Mark a symbol_tables as static_workspaces once parsing is complete
- If a symbol is added to a static_workspace, mark it as added_static
- Call symbol_table::force_varref to get around marking symbols with
added_static (used for .varargin., ans, ect.)
- If a symbol marked as added_static is accessed as a variable by
tree_indentifier::rvalue or tree_indentifier::lvalue error
This silliness exists because can't disallow adding new symbol_records to
static workspaces because that would prevent users from calling new
functions.
I have checked, and I see no new errors with this patch applied ontop of
14570:d07d96e53612.
(file #25674)
_______________________________________________________
Additional Item Attachment:
File name: static_workspace.patch Size:10 KB
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?36217>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/