From: Finn B. <bc...@us...> - 2001-02-04 20:02:36
|
Update of /cvsroot/jython/jython/org/python/compiler In directory usw-pr-cvs1:/tmp/cvs-serv24873 Modified Files: LocalsCompiler.java Log Message: global_stmt(): Fix a situation so that test_compile.py can run without errors. Index: LocalsCompiler.java =================================================================== RCS file: /cvsroot/jython/jython/org/python/compiler/LocalsCompiler.java,v retrieving revision 2.7 retrieving revision 2.8 diff -C2 -r2.7 -r2.8 *** LocalsCompiler.java 2001/02/04 14:56:29 2.7 --- LocalsCompiler.java 2001/02/04 14:59:28 2.8 *************** *** 173,176 **** --- 173,179 ---- for (int i=0; i<n; i++) { Object name = node.getChild(i).getInfo(); + if (locals.get(name) != null) + throw org.python.core.Py.SyntaxError("name " + name + + " is local and global"); globals.put(name, name); } |