Ticket #135 (closed defect: fixed)
bad code segment crashes cython
| Reported by: | hoytak | Owned by: | ksmith |
|---|---|---|---|
| Priority: | major | Milestone: | 0.11.3 |
| Component: | Type Analysis | Keywords: | |
| Cc: | ksmith |
Description
Hello,
The following (bad) code segment crashes cython:
cdef class A:
return None
The traceback is:
File "/home/hoytak/sysroot/lib/python2.5/site-packages/Cython/Distutils/build_ext.py", line 196, in cython_sources
full_module_name=module_name)
File "/home/hoytak/sysroot/lib/python2.5/site-packages/Cython/Compiler/Main.py", line 692, in compile
return compile_single(source, options, full_module_name)
File "/home/hoytak/sysroot/lib/python2.5/site-packages/Cython/Compiler/Main.py", line 637, in compile_single
return run_pipeline(source, options, full_module_name)
File "/home/hoytak/sysroot/lib/python2.5/site-packages/Cython/Compiler/Main.py", line 526, in run_pipeline
err, enddata = context.run_pipeline(pipeline, source)
File "/home/hoytak/sysroot/lib/python2.5/site-packages/Cython/Compiler/Main.py", line 185, in run_pipeline
data = phase(data)
File "Visitor.py", line 177, in Cython.Compiler.Visitor.CythonTransform.__call__ (/home/hoytak/sysroot/src/cython/Cython/Compiler/Visitor.c:2162)
File "Visitor.py", line 163, in Cython.Compiler.Visitor.VisitorTransform.__call__ (/home/hoytak/sysroot/src/cython/Cython/Compiler/Visitor.c:1924)
File "Visitor.py", line 43, in Cython.Compiler.Visitor.BasicVisitor.visit (/home/hoytak/sysroot/src/cython/Cython/Compiler/Visitor.c:901)
File "/home/hoytak/sysroot/lib/python2.5/site-packages/Cython/Compiler/ParseTreeTransforms.py", line 605, in visit_ModuleNode
node.body.analyse_expressions(node.scope)
File "/home/hoytak/sysroot/lib/python2.5/site-packages/Cython/Compiler/Nodes.py", line 318, in analyse_expressions
stat.analyse_expressions(env)
File "/home/hoytak/sysroot/lib/python2.5/site-packages/Cython/Compiler/Nodes.py", line 2534, in analyse_expressions
self.body.analyse_expressions(scope)
File "/home/hoytak/sysroot/lib/python2.5/site-packages/Cython/Compiler/Nodes.py", line 318, in analyse_expressions
stat.analyse_expressions(env)
File "/home/hoytak/sysroot/lib/python2.5/site-packages/Cython/Compiler/Nodes.py", line 3224, in analyse_expressions
return_type = env.return_type
AttributeError: CClassScope instance has no attribute 'return_type'
I'm using changset 1374
--Hoyt
Attachments
Change History
Note: See
TracTickets for help on using
tickets.

