Skip to content

Fix Issues 9999 & 10560 - [DIP1015] Deprecate & Remove implicit integer & character conversion to bool#7310

Closed
JinShil wants to merge 1 commit intodlang:masterfrom
JinShil:fix10560
Closed

Fix Issues 9999 & 10560 - [DIP1015] Deprecate & Remove implicit integer & character conversion to bool#7310
JinShil wants to merge 1 commit intodlang:masterfrom
JinShil:fix10560

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
Contributor

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
Contributor

@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

Comments