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
[BUG] Compiler error when casting to ctuple
#3808
Comments
I realize this is probably a minimized example to demonstrate the issue, but I can't see why the cast to a ctuple is useful here? I'd think |
Yeah it’s an oversimplified example just to demonstrate the issue. |
You didn't say what error occurred, but it probably fails to parse it, right? Such a cast is not really beautiful syntax, and most likely not something that was considered when ctuples were implemented. Is there really a use case for such a cast? In an assignment, you could always type the left hand side rather than casting the right hand side. In what kind of code have you noticed this? |
Yeah it seems to be a parsing error. Have added the exception to the detail in the OP. Fair enough. FWIW it seems readable and seems comparable in complexity to things like Only recently learned about No strong feelings on the resolution here (including closing if that is what we deem appropriate). |
It looks like it's being parsed basically correctly and only a small change is needed to make it work so I've submitted a fix. I'm still not convinced that there's a real need to do it, but it probably should work. |
Thanks for doing that :) |
Describe the bug
When attempting to cast to a
ctuple
, Cython runs into a compiler error.To Reproduce
Code to reproduce the behavior:
Exception:
Workaround (
ctypedef
ofctuple
):Expected behavior
The compiler error does not occur.
Environment (please complete the following information):
Additional context
NA
The text was updated successfully, but these errors were encountered: