From: Philip J. <re...@bu...> - 2008-08-30 20:57:58
|
New submission from Philip Jenvey <pj...@us...>: A decorator with 1 dot parses ok: @test_support.run_with_locale('LC_ALL', '') def foo(): print 'foo' but NPEs with 2 dots: @test.test_support.run_with_locale('LC_ALL', '') def bar(): print 'bar' Traceback (most recent call last): (no code object) at line 0 java.lang.NullPointerException at org.python.antlr.GrammarActions.makeDottedAttr(GrammarActions.java:217) at org.python.antlr.PythonParser.dotted_attr(PythonParser.java:931) at org.python.antlr.PythonParser.decorator(PythonParser.java:1069) at org.python.antlr.PythonParser.decorators(PythonParser.java:1245) at org.python.antlr.PythonParser.funcdef(PythonParser.java:1341) at org.python.antlr.PythonParser.compound_stmt(PythonParser.java:6268) at org.python.antlr.PythonParser.stmt(PythonParser.java:2360) at org.python.antlr.PythonParser.file_input(PythonParser.java:625) at org.python.antlr.ModuleParser.file_input(ModuleParser.java:39) at org.python.core.ParserFacade.parse(ParserFacade.java:114) at org.python.core.Py.compile_flags(Py.java:1669) at org.python.util.PythonInterpreter.execfile(PythonInterpreter.java:155) at org.python.util.jython.run(jython.java:224) at org.python.util.jython.main(jython.java:111) NullPointerException: java.lang.NullPointerException Example attached ---------- assignee: fwierzbicki components: Core files: dotted_decorator.py messages: 3461 nosy: fwierzbicki, pjenvey severity: major status: open title: parser NPE on dotted (more than 1) attribute decorators type: crash versions: 2.5alpha1 Added file: http://bugs.jython.org/file534/dotted_decorator.py _______________________________________ Jython tracker <re...@bu...> <http://bugs.jython.org/issue1116> _______________________________________ |