Skip to content

fix: check nan during casting from float to boolean#1437

Merged
dcodeIO merged 11 commits into
AssemblyScript:masterfrom
MaxGraey:fix-float-to-bool-cast
Aug 20, 2020
Merged

fix: check nan during casting from float to boolean#1437
dcodeIO merged 11 commits into
AssemblyScript:masterfrom
MaxGraey:fix-float-to-bool-cast

Conversation

@MaxGraey

@MaxGraey MaxGraey commented Aug 17, 2020

Copy link
Copy Markdown
Member

description in this comment

Also change implementation for float to boolean conversion

  • I've read the contributing guidelines

@MaxGraey MaxGraey requested a review from dcodeIO August 17, 2020 20:23
Comment thread src/compiler.ts Outdated
Comment thread src/compiler.ts Outdated
@dcodeIO

dcodeIO commented Aug 20, 2020

Copy link
Copy Markdown
Member

Since this is close to black magic, can we add a few tests for NaN (various bit patterns ideally), Infinity, -Infinity, 0.0, f64.MIN_VALUE, f64.MAX_VALUE, just for peace of mind? :)

@MaxGraey

Copy link
Copy Markdown
Member Author

Done!

@MaxGraey MaxGraey requested a review from dcodeIO August 20, 2020 12:57
Comment thread tests/compiler/bool.ts
@MaxGraey MaxGraey requested a review from dcodeIO August 20, 2020 14:52
@dcodeIO dcodeIO merged commit 45bfe04 into AssemblyScript:master Aug 20, 2020
@MaxGraey MaxGraey deleted the fix-float-to-bool-cast branch August 20, 2020 15:46
@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 0.14.9 🎉

The release is available on:

Your semantic-release bot 📦🚀

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