From: <pj...@us...> - 2008-10-09 23:23:13
|
Revision: 5366 http://jython.svn.sourceforge.net/jython/?rev=5366&view=rev Author: pjenvey Date: 2008-10-09 23:23:05 +0000 (Thu, 09 Oct 2008) Log Message: ----------- fix lambdas within decorator args causing an NPE. we weren't initializing their scopes Modified Paths: -------------- trunk/jython/src/org/python/compiler/ScopesCompiler.java Modified: trunk/jython/src/org/python/compiler/ScopesCompiler.java =================================================================== --- trunk/jython/src/org/python/compiler/ScopesCompiler.java 2008-10-06 22:08:13 UTC (rev 5365) +++ trunk/jython/src/org/python/compiler/ScopesCompiler.java 2008-10-09 23:23:05 UTC (rev 5366) @@ -106,6 +106,11 @@ visit(defaults[i]); } + exprType[] decs = node.decorators; + for (int i = decs.length - 1; i >= 0; i--) { + visit(decs[i]); + } + beginScope(node.name, FUNCSCOPE, node, ac); int n = ac.names.size(); for (int i = 0; i < n; i++) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |