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

Compiler crash when assigning a function that takes a typed memoryview #3254

Open
marcogherardi opened this issue Nov 30, 2019 · 0 comments
Open

Comments

@marcogherardi
Copy link

@marcogherardi marcogherardi commented Nov 30, 2019

Compiling a file crash.pyx containing this

cdef void callback(int [:]):
	pass
func = callback

with cython crash.pyx gives me this

Error compiling Cython file:
------------------------------------------------------------
...
cdef void callback(int [:]):
                  ^
------------------------------------------------------------

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

File 'ModuleNode.py', line 124, in analyse_declarations: ModuleNode(crash.pyx:1:0,
    full_module_name = 'crash')
File 'Nodes.py', line 431, in analyse_declarations: StatListNode(crash.pyx:1:0)
File 'Nodes.py', line 2358, in analyse_declarations: CFuncDefNode(crash.pyx:1:5,
    modifiers = [...]/0,
    visibility = 'private')
File 'Nodes.py', line 683, in analyse: CFuncDeclaratorNode(crash.pyx:1:18,
    calling_convention = '')
File 'Nodes.py', line 878, in analyse: CArgDeclNode(crash.pyx:1:19,
    is_generic = 1,
    outer_attrs = [...]/2)

Compiler crash traceback from this point on:
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/Cython/Compiler/Nodes.py", line 878, in analyse
    if self.base_type.is_basic_c_type:
AttributeError: 'MemoryViewSliceTypeNode' object has no attribute 'is_basic_c_type'

Cython version 0.29.14

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.