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

converter doesn't work for case statement branches with the .. operator #11422

Closed
sealmove opened this issue Jun 6, 2019 · 2 comments · Fixed by #24187
Closed

converter doesn't work for case statement branches with the .. operator #11422

sealmove opened this issue Jun 6, 2019 · 2 comments · Fixed by #24187

Comments

@sealmove
Copy link
Contributor

sealmove commented Jun 6, 2019

The following code crushes the compiler

converter toInt(c: char): int = int(c)
var c: int = 5
case c
of 'a' .. 'c': discard
else: discard
bug.nim(5, 4) Error: internal error: genLiteral(nkHiddenCallConv)
No stack traceback available
To create a stacktrace, rerun compilation with ./koch temp c <file>
@sealmove sealmove changed the title converter doesn't work for case branches with the .. operator converter doesn't work for case statement branches with the .. operator Jun 6, 2019
@kraptor
Copy link
Contributor

kraptor commented Jan 8, 2020

related to #8984

@metagn
Copy link
Collaborator

metagn commented Sep 27, 2024

semBranchRange calls fitNode after semConstExpr, probably just adapt #8336 to it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants