Skip to content
This repository has been archived by the owner on Oct 12, 2022. It is now read-only.

Prepare for stack-allocated array literals passed to scope slice params #3032

Merged
merged 1 commit into from
Apr 14, 2020

Conversation

kinke
Copy link
Contributor

@kinke kinke commented Apr 14, 2020

No description provided.

@dlang-bot
Copy link
Contributor

Thanks for your pull request and interest in making D better, @kinke! We are looking forward to reviewing it, and you should be hearing from a maintainer soon.
Please verify that your PR follows this checklist:

  • My PR is fully covered with tests (you can see the coverage diff by visiting the details link of the codecov check)
  • My PR is as minimal as possible (smaller, focused PRs are easier to review than big ones)
  • I have provided a detailed rationale explaining my changes
  • New or modified functions have Ddoc comments (with Params: and Returns:)

Please see CONTRIBUTING.md for more information.


If you have addressed all reviews or aren't sure how to proceed, don't hesitate to ping us with a simple comment.

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 run digger -- build "master + druntime#3032"

@schveiguy
Copy link
Member

Shouldn't templates be inferred for scope-ness?

@kinke
Copy link
Contributor Author

kinke commented Apr 14, 2020

I didn't want to dig into why it was necessary to overcome DIP1000 errors when making the testcase in the linked DMD PR @safe:

test\runnable\test20734.d(17): Error: reference to local variable __arrayliteral_on_stack3 assigned to non-scope parameter a calling core.internal.destruction.__ArrayDtor!(S).__ArrayDtor

@MoonlightSentinel
Copy link
Contributor

Another case where DIP1000 doesn't like expression temporarys ...

@schveiguy
Copy link
Member

OK yeah, template inference sometimes breaks down, I've seen it with other things. I wish dip1000 was easier to figure out.

@dlang-bot dlang-bot merged commit 9866c02 into dlang:master Apr 14, 2020
@kinke kinke deleted the scope branch April 14, 2020 14:42
@Geod24
Copy link
Member

Geod24 commented Apr 14, 2020

This fixed issue https://issues.dlang.org/show_bug.cgi?id=18872

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants