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

for non-ptr params, return-scope goes away #9374

Merged
merged 1 commit into from
Feb 20, 2019

Conversation

WalterBright
Copy link
Member

Before ref return scope p means ref and return scope. But for ref return scope i it means ref return i. This changes the latter to be ref i. The reason is generic code, where the type of i or p is not known in advance. Makes for consistent behavior with generic code.

@dlang-bot
Copy link
Contributor

Thanks for your pull request, @WalterBright!

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

Copy link
Contributor

@thewilsonator thewilsonator left a comment

Choose a reason for hiding this comment

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

I think I understand what you are saying, but this needs to be documented properly, with examples.

@thewilsonator thewilsonator added the Needs Spec PR A PR updating the language specification needs to be submitted to dlang.org label Feb 19, 2019
@WalterBright WalterBright added the WIP Work In Progress - not ready for review or pulling label Feb 19, 2019
@WalterBright WalterBright force-pushed the return-scope branch 3 times, most recently from 3b2ee66 to a0ea3d9 Compare February 19, 2019 05:19
@WalterBright WalterBright added the Vision Vision Plan https://wiki.dlang.org/Vision/2018H1 label Feb 19, 2019
@WalterBright WalterBright removed the WIP Work In Progress - not ready for review or pulling label Feb 19, 2019
@WalterBright
Copy link
Member Author

Spec PR: dlang/dlang.org#2584

@WalterBright WalterBright removed the Needs Spec PR A PR updating the language specification needs to be submitted to dlang.org label Feb 19, 2019
@WalterBright WalterBright dismissed thewilsonator’s stale review February 19, 2019 08:18

spec PR added, test case too.

@WalterBright WalterBright added the Blocking Other Work review and pulling should be a priority label Feb 20, 2019
@WalterBright
Copy link
Member Author

Blocking #9220

@dlang-bot dlang-bot merged commit 777d21f into dlang:master Feb 20, 2019
@WalterBright WalterBright deleted the return-scope branch February 20, 2019 05:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-merge Blocking Other Work review and pulling should be a priority Vision Vision Plan https://wiki.dlang.org/Vision/2018H1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants