-
-
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
rst.whichMsgClass
is buggy: relies on $enum instead of $ast(enum)
#17280
Comments
2 tasks
To have |
@a-mr fix 3 has been merged so you can go ahead and use it to close this issue |
a-mr
added a commit
to a-mr/Nim
that referenced
this issue
Mar 11, 2021
a-mr
added a commit
to a-mr/Nim
that referenced
this issue
Mar 12, 2021
narimiran
pushed a commit
that referenced
this issue
Mar 17, 2021
ringabout
pushed a commit
to ringabout/Nim
that referenced
this issue
Mar 22, 2021
ardek66
pushed a commit
to ardek66/Nim
that referenced
this issue
Mar 26, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
/cc @a-mr
root cause for #17257 (comment)
the problem is this code:
relies on
$k
which doesn't reflect the ast symbol of the enumAdditional Information
1.5.1 07df4fe
proposed solution
I'd like all 3 things below:
fix 1
use range:
then:
fix 2
replace
(eg from #17257)
accordingly now that the bug gets fixed, ditto for all (or most) of the other
expect(AssertionDefect):
fix 3 + proposal: enumutils.symbolName
(EDIT: => #17281)
not needed to fix this issue but still useful in general (and would provide an alternative way to fix this): add
proc nativeString(a: enum): string
which returns the native string for an enum, ignoring the string definition. This should address remaining concerns for using this kind of enums:(refs #15775 (comment))
since it gives both stringified form (most common case) as well as access to native name ("a0"):
The text was updated successfully, but these errors were encountered: