Closed stefanv closed 1 year ago
looks like a bug, thanks for the report! 🙌
OK, got it, it's that CythonArrayNode
has a base_type_node
attribute, but it doesn't appear in child_attrs
, so it doesn't get traversed:
(Pdb) tree.body.body.stats[-1].expr.args[0]
<Cython.Compiler.ExprNodes.CythonArrayNode object at 0x7fce9077bb80>
(Pdb) tree.body.body.stats[-1].expr.args[0].child_attrs
['operand', 'shapes']
(Pdb) tree.body.body.stats[-1].expr.args[0].base_type_node
<Cython.Compiler.Nodes.MemoryViewSliceTypeNode object at 0x7fce9077bac0>
I'll report upstream, but for now I'll patch around it and make a new release
I am not 100% sure whether this is a bug or not. Maybe cython-lint knows something about that pointer cast I don't.
Input:
Output: