Skip to content

Conversation

dcodeIO
Copy link
Member

@dcodeIO dcodeIO commented Dec 7, 2019

This fixes a bug where, when simplifying compilation of logical expressions due to only being interested in true or false, like in

if (someI64 >> 63 && someBool) ...

the result type of the inner logical expression was still set to the left type (here i64), even though earlier code correctly set it to bool, leading to a validation error down the road.

cc @MaxGraey: Does this fix the problem you mentioned?

@MaxGraey
Copy link
Member

MaxGraey commented Dec 7, 2019

could you add tests for prevent regression in future?

@dcodeIO dcodeIO requested a review from MaxGraey December 7, 2019 05:18
Copy link
Member

@MaxGraey MaxGraey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@dcodeIO dcodeIO merged commit 5dc20c9 into master Dec 7, 2019
@dcodeIO dcodeIO deleted the fix-logical-type branch January 1, 2020 14:22
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