You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Basically this line has to be done without the global state: https://github.com/PMunch/futhark/blob/master/src/futhark.nim#L349
Since usedNames is passed in (through state, but there is an overload here) it should be fairly simple to create a new one for each enum and just use sanitizeName with that
The text was updated successfully, but these errors were encountered:
Tried to implement this but Nim wasn't happy with the redefinition either.. Could you make a test case showcasing what you wanted?
You are right. I just tested without a {.pure.} enum and nim is not happy :(
I guess I only tried this with pure before? I thought enum fields didn't collide with any other symbol 🤔
typeThing*{.pure.}=enumOne, TwotypeOne*=object
val *:intechoOne(val: 1)
echo$One
This works, but apparently it doesn't without pure
Hmm, I have to read up on what pure does. It used to be a lot stricter, but if it's relaxed enough now I'd be open to marking all enums as pure. Another difficulty wa that the when declared checks tripped up. So I'll need to refine those in a way which makes them only fire if it would trigger a collision.
Quote from discord:
The text was updated successfully, but these errors were encountered: