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 18708 - Flow analysis in constructors not done correctly fo… #8118

Merged
merged 1 commit into from Apr 4, 2018

Conversation

WalterBright
Copy link
Member

…r if, ||, &&

@dlang-bot
Copy link
Contributor

Thanks for your pull request, @WalterBright!

Bugzilla references

Auto-close Bugzilla Severity Description
18708 normal Flow analysis in constructors not done correctly for if,

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 "master + dmd#8118"

/******************************
* OR CSX bits to `this`
* Params:
* from = bits to OR in
Copy link
Contributor

Choose a reason for hiding this comment

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

The name of the parameter is ctorflow.

@@ -0,0 +1,64 @@
/* TEST_OUTPUT:
---
fail_compilation/test18708.d(24): Error: one path skips field `s`
Copy link
Contributor

Choose a reason for hiding this comment

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

Can the missing path be included in the error message?

Copy link
Member Author

Choose a reason for hiding this comment

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

Changing error messages is beyond the scope of this PR.

ctorflow.freeFieldinit();
}
}
enclosing.ctorflow.OR(ctorflow);
Copy link
Contributor

Choose a reason for hiding this comment

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

Indentention looks inconsistent.

Copy link
Contributor

@RazvanN7 RazvanN7 Apr 3, 2018

Choose a reason for hiding this comment

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

It isn't. This line is in an if block.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ok, I’m a bit limited here on my phone.

@WalterBright WalterBright merged commit 190e2e0 into dlang:master Apr 4, 2018
@WalterBright WalterBright deleted the fix18708 branch April 4, 2018 22:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
4 participants