From: <fwi...@us...> - 2009-12-30 15:38:51
|
Revision: 6958 http://jython.svn.sourceforge.net/jython/?rev=6958&view=rev Author: fwierzbicki Date: 2009-12-30 15:38:42 +0000 (Wed, 30 Dec 2009) Log Message: ----------- Fix for http://bugs.jython.org/issue1530: BoolOp in multiple assign causes VerifyError. Thanks to Philip Cannata for reporting the issue. I also added a test but unfortunately it had to be disabled until I can rework PythonPartial.g to also call this (and other) bad syntax invalid. Modified Paths: -------------- trunk/jython/Lib/test/test_codeop.py trunk/jython/NEWS trunk/jython/src/org/python/antlr/GrammarActions.java Modified: trunk/jython/Lib/test/test_codeop.py =================================================================== --- trunk/jython/Lib/test/test_codeop.py 2009-12-14 15:51:11 UTC (rev 6957) +++ trunk/jython/Lib/test/test_codeop.py 2009-12-30 15:38:42 UTC (rev 6958) @@ -292,7 +292,6 @@ ai("return 2.3") ai("if (a == 1 and b = 2): pass") - # XXX: PythonPartial.g needs to reject these. if not is_jython: ai("del 1") @@ -301,6 +300,7 @@ ai("del [1]") ai("del '1'") ai("[i for i in range(10)] = (1, 2, 3)") + ai("a = 1 and b = 2"); def test_filename(self): self.assertEquals(compile_command("a = 1\n", "abc").co_filename, Modified: trunk/jython/NEWS =================================================================== --- trunk/jython/NEWS 2009-12-14 15:51:11 UTC (rev 6957) +++ trunk/jython/NEWS 2009-12-30 15:38:42 UTC (rev 6958) @@ -2,6 +2,7 @@ Jython 2.5.2a1 Bugs Fixed + - [ 1530 ] BoolOp in multiple assign causes VerifyError - [ 1478 ] defaultdict & weakref.WeakKeyDictionary [TypeError: first argument must be callable] - [ 1487 ] Import of module with latin-1 chars fails on utf-8 file encoding - [ 1449 ] Ellipsis comparison different from Python 2.5 to Jython 2.5 Modified: trunk/jython/src/org/python/antlr/GrammarActions.java =================================================================== --- trunk/jython/src/org/python/antlr/GrammarActions.java 2009-12-14 15:51:11 UTC (rev 6957) +++ trunk/jython/src/org/python/antlr/GrammarActions.java 2009-12-30 15:38:42 UTC (rev 6958) @@ -535,6 +535,8 @@ errorHandler.error("can't assign to yield expression", e); } else if (e instanceof BinOp) { errorHandler.error("can't assign to operator", e); + } else if (e instanceof BoolOp) { + errorHandler.error("can't assign to operator", e); } else if (e instanceof Lambda) { errorHandler.error("can't assign to lambda", e); } else if (e instanceof Call) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |