-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
recursive function with static argument changes argument type from enum to int #9520
Labels
Comments
an enum is internally represented as an integer. A static arguments instanciates the function for each argument value. My guess it that during this instantiation the information that a is actually an enum is lost. |
krux02
changed the title
Bug with recursive functions and static types
recursive function with static argument changes argument type from enum to int
Oct 26, 2018
Related to this I suppose: #7375 |
PMunch
pushed a commit
to PMunch/Nim
that referenced
this issue
Jan 6, 2021
* close nim-lang#9679 * close nim-lang#7546 * close nim-lang#9520 * close nim-lang#6177
mildred
pushed a commit
to mildred/Nim
that referenced
this issue
Jan 11, 2021
* close nim-lang#9679 * close nim-lang#7546 * close nim-lang#9520 * close nim-lang#6177
irdassis
pushed a commit
to irdassis/Nim
that referenced
this issue
Mar 16, 2021
* close nim-lang#9679 * close nim-lang#7546 * close nim-lang#9520 * close nim-lang#6177
ardek66
pushed a commit
to ardek66/Nim
that referenced
this issue
Mar 26, 2021
* close nim-lang#9679 * close nim-lang#7546 * close nim-lang#9520 * close nim-lang#6177
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The output is not correct and weirdly enough only recursive functions are affected.
Example
Current Output
Expected Output
Interestingly that if you remove unrelated recursive call then you will get expected output:
Val1
.The text was updated successfully, but these errors were encountered: