-
Notifications
You must be signed in to change notification settings - Fork 58
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
Compiled renderer ignores truthy conditions #80
Comments
#80 Turns out the compilation renderer didn't do a ton of things for truthy checks that the standard renderer does. It now checks all numeric types and wraps all the checks in a lambda that determines what the result is, much like the hand-rolled version.
Hi there, Thanks again for the great reproduction, while unpicking this I found plenty of other cases where this didn't work, our test coverage was lacking and we just lacked feature parity with the standard renderer. I've changed how the truthy checks work, added more test coverage around that area and at the same time simplified some of the generated code. I'll aim to get this released tomorrow. Thanks for opening this issue and let us know if you have any other issues. |
#80 Turns out the compilation renderer didn't do a ton of things for truthy checks that the standard renderer does. It now checks all numeric types and wraps all the checks in a lambda that determines what the result is, much like the hand-rolled version.
@jnferner Thanks very much for reporting this. It has been fixed in release 1.6.3 and has now been released on nuget. Please let us know if you have any other issues. |
Thanks for the quick fixes :) |
MCVE:
When using the default renderer, this code renders "foo". However, the compiled renderer sees
Condition
asfalse
and doesn't render anything.The text was updated successfully, but these errors were encountered: