Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failing case #1 for annotating code with errors #616

Closed
robertwb opened this issue Aug 22, 2008 · 2 comments
Closed

Failing case #1 for annotating code with errors #616

robertwb opened this issue Aug 22, 2008 · 2 comments

Comments

@robertwb
Copy link
Contributor

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
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.

Migrated from http://trac.cython.org/ticket/59

@robertwb
Copy link
Contributor Author

robertwb commented Sep 5, 2008

@scoder changed resolution to fixed
status from new to closed
commented

Fix committed.

@robertwb robertwb closed this as completed Sep 5, 2008
@robertwb
Copy link
Contributor Author

robertwb commented Oct 8, 2008

@robertwb changed milestone from wishlist to 0.9.8.2
commented

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant