Ticket #59 (closed defect: fixed)
Failing case #1 for annotating code with errors
| Reported by: | hoytak@… | Owned by: | somebody |
|---|---|---|---|
| Priority: | minor | Milestone: | 0.10 |
| Component: | Build System | Keywords: | Code Annotation |
| Cc: |
Description
Hello,
the following incorrect code causes cython -a to raise an exception.
cdef class X:
cdef cinit(self):
self.X = not_defined
cython -a produces the following:
Error converting Pyrex file to C:
... cdef class X:
cdef cinit(self):
/home/hoytak/workspace/clsynth-cython/clsynth/testcase.pyx:2:9: Special methods must be declared with 'def', not 'cdef'
Error converting Pyrex file to C:
... cdef class X:
cdef cinit(self):
self.X = not_defined
/home/hoytak/workspace/clsynth-cython/clsynth/testcase.pyx:3:28: undeclared name not builtin: not_defined Traceback (most recent call last):
File "/home/hoytak/sysroot/bin/cython", line 8, in <module>
main(command_line = 1)
File "/home/hoytak/sysroot/lib/python2.5/site-packages/Cython/Compiler/Main.py", line 698, in main
result = compile(sources, options)
File "/home/hoytak/sysroot/lib/python2.5/site-packages/Cython/Compiler/Main.py", line 675, in compile
return compile_multiple(source, options)
File "/home/hoytak/sysroot/lib/python2.5/site-packages/Cython/Compiler/Main.py", line 645, in compile_multiple
result = run_pipeline(source, options)
File "/home/hoytak/sysroot/lib/python2.5/site-packages/Cython/Compiler/Main.py", line 507, in run_pipeline
err, enddata = context.run_pipeline(pipeline, source)
File "/home/hoytak/sysroot/lib/python2.5/site-packages/Cython/Compiler/Main.py", line 169, in run_pipeline
data = phase(data)
File "/home/hoytak/sysroot/lib/python2.5/site-packages/Cython/Compiler/Main.py", line 114, in generate_pyx_code
module_node.process_implementation(options, result)
File "/home/hoytak/sysroot/lib/python2.5/site-packages/Cython/Compiler/ModuleNode.py", line 67, in process_implementation
self.generate_c_code(env, options, result)
File "/home/hoytak/sysroot/lib/python2.5/site-packages/Cython/Compiler/ModuleNode.py", line 261, in generate_c_code
self.generate_typeobj_definitions(env, code)
File "/home/hoytak/sysroot/lib/python2.5/site-packages/Cython/Compiler/ModuleNode.py", line 779, in generate_typeobj_definitions
self.generate_new_function(scope, code)
File "/home/hoytak/sysroot/lib/python2.5/site-packages/Cython/Compiler/ModuleNode.py", line 873, in generate_new_function
if entry.trivial_signature:
AttributeError?: Entry instance has no attribute 'trivial_signature'
I'm using 1080:c41700a7a340 from the cython-devel repository.
