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
Still looking at this. It definitely has to do with stage reordering, and in fixing the original problem I've exposed a similar problem with doubly-nested ternaries.
Here we go, finally fixed as of 8a5a6dc - sorry that took so long!
The fix here should address quite a few edge cases, too. Ternaries are a bit special, and there was a flaw with how the library was deciding which part should be evaluated first. Wasn't a major flaw, but was wide enough that it would cause a bunch of random hard-to-repro bugs if not addressed.
I added a test for your use case (and it passes), so i'm closing, feel free to reopen if this reoccurs!
This expression " (2 == 2) ? 5 : (true ? 0 : 6) " fails with:
"Value '5' cannot be used with the ternary operator '?', it is not a bool"
I can only guess that it incorrectly handles the nested ternary and tries to parse the 5 as part of the Left of the second ternary.
Cool library by the way. Thanks for publishing it!
The text was updated successfully, but these errors were encountered: