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 19777 - SortedRange.opSlice should infer safety #6984

Merged
merged 1 commit into from
Apr 28, 2019

Conversation

MartinNowak
Copy link
Member

  • unittests did fail with DIP1000 due to missing return scope
    inference in chained range, thus leading to a scope violation
    which prevented @safe inference
  • fixed unittests by adding return scope to chain.Result
  • would still fail under dip1000 with other ranges that
    miss return scope on their opSlice
  • should not have any effect on non-DIP1000 usage

- unittests did fail with DIP1000 due to missing return scope
  inference in chained range, thus leading to a scope violation
  which prevented `@safe` inference
- fixed unittests by adding return scope to chain.Result
- would still fail under dip1000 with other ranges that
  miss return scope on their opSlice
- should not have any effect on non-DIP1000 usage
@dlang-bot
Copy link
Contributor

Thanks for your pull request, @MartinNowak!

Bugzilla references

Auto-close Bugzilla Severity Description
19777 regression [REG2.086a] SortedRange.opSlice is wrongly @trusted

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 + phobos#6984"

@MartinNowak MartinNowak added the stable-priority A regression fix to stable that should receive higher priority label Apr 28, 2019
@MartinNowak MartinNowak added this to the 2.086.0 milestone Apr 28, 2019
@MartinNowak
Copy link
Member Author

Please ignore the dlang/druntime benchmark link failure in buildkite, this is due to an incorrect setup (the benchmark would import phobos stable but link against phobos head).

@thewilsonator thewilsonator merged commit 9026449 into dlang:stable Apr 28, 2019
@MartinNowak MartinNowak deleted the fix19777 branch April 28, 2019 14:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Fix stable-priority A regression fix to stable that should receive higher priority
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants