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

compiler crashes if fcpdef function parameter is *something #1966

Open
realead opened this Issue Oct 29, 2017 · 0 comments

Comments

Projects
None yet
1 participant
@realead
Contributor

realead commented Oct 29, 2017

I get a compiler crash when try to compile the following (silly) function due to a typo:

#crash.pyx
cpdef myTest(*arr):
    pass

Here:

python --version
Python 3.6.2 :: Anaconda custom (64-bit)
python -m cython --version
Cython version 0.27.1
python -m cython crash.pyx 

Error compiling Cython file:
------------------------------------------------------------
...
cpdef myTest(*arr):
     ^
------------------------------------------------------------

crash.pyx:1:6: 'myTest' is not a type identifier

Error compiling Cython file:
------------------------------------------------------------
...
cpdef myTest(*arr):
     ^
------------------------------------------------------------

crash.pyx:1:6: Suite attached to non-function declaration

Error compiling Cython file:
------------------------------------------------------------
...
cpdef myTest(*arr):
     ^
------------------------------------------------------------

crash.pyx:1:6: Compiler crash in AnalyseDeclarationsTransform

File 'ModuleNode.py', line 122, in analyse_declarations: ModuleNode(crash.pyx:1:0,
    full_module_name = 'crash')
File 'Nodes.py', line 417, in analyse_declarations: StatListNode(crash.pyx:1:6)
File 'Nodes.py', line 2308, in analyse_declarations: CFuncDefNode(crash.pyx:1:6,
    modifiers = [...]/0,
    overridable = 1,
    visibility = 'private')

Compiler crash traceback from this point on:
  File "/home/XXX/anaconda3/lib/python3.6/site-packages/Cython/Compiler/Nodes.py", line 2308, in analyse_declarations
    declarator = declarator.base
AttributeError: 'CNameDeclaratorNode' object has no attribute 'base'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment