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 Issue 19227 - S.init is S.init failing for struct with float member #9073

Merged
merged 2 commits into from
Dec 14, 2018

Conversation

WalterBright
Copy link
Member

No description provided.

@WalterBright WalterBright added the Severity:Regression PRs that fix regressions label Dec 13, 2018
@dlang-bot
Copy link
Contributor

dlang-bot commented Dec 13, 2018

Thanks for your pull request, @WalterBright!

Bugzilla references

Auto-close Bugzilla Severity Description
19227 regression S.init is S.init failing for struct with float member

Testing this PR locally

If you don't have a local development environment setup, you can use Digger to test this PR:

dub fetch digger
dub run digger -- build "stable + dmd#9073"

@WalterBright WalterBright changed the base branch from master to stable December 13, 2018 09:04
@@ -1254,9 +1261,11 @@ private int ctfeRawCmp(const ref Loc loc, Expression e1, Expression e2)
{
real_t r1 = e1.type.isreal() ? e1.toReal() : e1.toImaginary();
real_t r2 = e1.type.isreal() ? e2.toReal() : e2.toImaginary();
if (identity)
return !RealEquals(r1, r2);
Copy link
Member

Choose a reason for hiding this comment

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

Note: RealEquals corresponds to is rather than == (all NaNs are equal, +0.0 and -0.0 are unequal), so it's correct.

Copy link
Member

@PetarKirov PetarKirov left a comment

Choose a reason for hiding this comment

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

LGTM as well.

@PetarKirov
Copy link
Member

Auto-merge toggled on

@PetarKirov PetarKirov merged commit 883b593 into dlang:stable Dec 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants