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 Issues 9999 & 10560 - [DIP1015] Deprecate & Remove implicit integer & character conversion to bool #7310

Closed
wants to merge 1 commit into from

Conversation

JinShil
Copy link
Contributor

@JinShil JinShil commented Nov 12, 2017

Revival of #6404

This is pending approval of this DIP: https://github.com/dlang/DIPs/blob/master/DIPs/DIP1015.md

@dlang-bot
Copy link
Contributor

dlang-bot commented Nov 12, 2017

Thanks for your pull request, @JinShil!

Bugzilla references

Auto-close Bugzilla Severity Description
9999 enhancement Integer literal 0 and 1 should prefer integer type in overload resolution
10560 critical Enum typed as int with value equal to 0 or 1 prefer bool over int overload

⚠️⚠️⚠️ Warnings ⚠️⚠️⚠️

To target stable perform these two steps:

  1. Rebase your branch to upstream/stable:
git rebase --onto upstream/stable upstream/master
  1. Change the base branch of your PR to stable

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#7310"

@JinShil JinShil changed the title Fix Issues 9999 & 10560 - Deprecate & Remove implicit integer & chara… Fix Issues 9999 & 10560 - Deprecate & Remove implicit integer & character conversion to bool Nov 22, 2017
@wilzbach
Copy link
Member

FYI this definitely needs to be a deprecation - building druntime already fails:

src/core/thread.d(4223): Error: cannot implicitly convert expression `0` of type `int` to `bool`
src/core/thread.d(4223): Error: cannot implicitly convert expression `0` of type `int` to `bool`

@wilzbach
Copy link
Member

@JinShil if you change the PR back to a deprecation, Jenkins should run through all projects. You can go to "Classic" (the door button on the right) and select "Console output". It's the entire output which you can use to grep for the deprecation message. This is probably the easiest way to assess the impact of this change.

Oh and Phobos won't build with deprecation warnings.

@JinShil JinShil changed the title Fix Issues 9999 & 10560 - Deprecate & Remove implicit integer & character conversion to bool Fix Issues 9999 & 10560 - [DIP1015] Deprecate & Remove implicit integer & character conversion to bool Sep 16, 2018
@JinShil
Copy link
Contributor Author

JinShil commented Nov 11, 2018

I've been informed that DIP1015 was rejected, so I'm closing this.

I urge @WalterBright and @andralex to either close issues 9999 and 10560 as invalid or offer an alternate solution.

cc @mdparker

@JinShil JinShil closed this Nov 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants