robertwb / issues-import-test

0 stars 0 forks source link

ScopedExprNode doesn't support closures #137

Open robertwb opened 7 years ago

robertwb commented 7 years ago

Reported by vitja on 9 Nov 2011 06:40 UTC

$ cat x.py
# cython: language_level=3

def foo():
    return [i for i in range(3)](lambda:)

$ gcc -fPIC -shared -O0 -g3 -I/usr/include/python2.7 -W -Wall -DCYTHON_REFNANNY x.c -o x.so
x.c:   __pyx_lambda_funcdef_lambda1:
x.c:507:3: : __pyx_7genexpr__pyx_v_i undeclared (first use in this function)
x.c:507:3: : each undeclared identifier is reported only once for each function it appears in

Migrated-From: http://trac.cython.org/ticket/753