Skip to content
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

Fix creating float from int #181

Merged
merged 3 commits into from
Jan 1, 2018
Merged

Fix creating float from int #181

merged 3 commits into from
Jan 1, 2018

Conversation

ilyapuchka
Copy link
Collaborator

Currently all number literals are implicitly converted to Float, which can lead to unexpected output, i.e.
"{{ value|default:0 }}" will output 0.0 where 0 is more likely expected. This fix first checks if literal is an Int and then returns it, otherwise it returns Float.

@ilyapuchka ilyapuchka requested a review from kylef December 29, 2017 16:31
@ilyapuchka ilyapuchka merged commit 2e80f70 into master Jan 1, 2018
@ilyapuchka ilyapuchka deleted the fix-float-from-int branch January 1, 2018 14:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants