Skip to content

Remove contracts from StaticForEach#8540

Merged
WalterBright merged 1 commit intodlang:masterfrom
ibuclaw:rmcontracts
Aug 7, 2018
Merged

Remove contracts from StaticForEach#8540
WalterBright merged 1 commit intodlang:masterfrom
ibuclaw:rmcontracts

Conversation

@ibuclaw
Copy link
Member

@ibuclaw ibuclaw commented Aug 6, 2018

There's no benefit to having them there over just having the assert as part of the body.

The use of body vs. do also prevents the frontend from being built by older compilers in the 2.07x series, such as what's used by the pre-built gdc-7 packages in Debian.

@ibuclaw ibuclaw requested a review from Geod24 as a code owner August 6, 2018 21:10
@dlang-bot
Copy link
Contributor

Thanks for your pull request, @ibuclaw!

Bugzilla references

Your PR doesn't reference any Bugzilla issue.

If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog.

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

@ibuclaw ibuclaw added Compiler:GDC Gnu D Compiler Review:Trivial typos, formatting, comments labels Aug 7, 2018
@jacob-carlborg
Copy link
Contributor

There's no benefit to having them there over just having the assert as part of the body.

No, not how it currently works. Ideally the contracts should be executed by the caller, then it makes a difference.

@WalterBright WalterBright merged commit 232c85f into dlang:master Aug 7, 2018
@ibuclaw ibuclaw deleted the rmcontracts branch August 7, 2018 08:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Compiler:GDC Gnu D Compiler Review:Trivial typos, formatting, comments

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants