A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/cython/cython/issues/4388 below:

[BUG] addition of the `pxd` breaks pure mode · Issue #4388 · cython/cython · GitHub

Describe the bug
Valid pure python mode code stops compiling if pxd file with declarations from the code is added.

To Reproduce
py file:

import cython

@cython.cfunc
def foo() -> cython.void:
    pass

pxd file:

output:

Error compiling Cython file:
------------------------------------------------------------
...
import cython

@cython.cfunc
^
------------------------------------------------------------

ex.py:3:0: Function signature does not match previous declaration
Traceback (most recent call last):
    ...
    raise CompileError(None, pyx_file)
Cython.Compiler.Errors.CompileError: ex.py

but if we will remove type declarations (specifically cython.cfunc, but let's remove all of them) then everything will compile:

py:

(same pxd)

I would say that if we can compile that without type declarations then we should be able to do the same with them.
And clearly, the problem is not in the type declarations, that do not match.

Environment:


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4