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

Lazy expression evaluation doesn't check parent scope for deprecations #19551

Open
dlangBugzillaToGithub opened this issue Apr 4, 2019 · 2 comments
Labels

Comments

@dlangBugzillaToGithub
Copy link

Seb reported this on 2019-04-04T11:13:49Z

Transferred from https://issues.dlang.org/show_bug.cgi?id=19789

Description

The following shouldn't trigger any deprecation messages as we're inside a deprecated AST branch, but lazy doesn't seem to check its parent scope:

---
deprecated struct Foo { int i;}

void bar(T)(lazy T e) { e(); }

deprecated void main()
{
    bar(Foo(42));
}
---
@dlangBugzillaToGithub
Copy link
Author

dlang-bot commented on 2019-04-04T11:17:32Z

@wilzbach updated dlang/druntime pull request #1982 "Make deprecation warnings compile errors" mentioning this issue:

- Workaround Issue 19789: add a copy of _assertThrown

https://github.com/dlang/druntime/pull/1982

@dlangBugzillaToGithub
Copy link
Author

dlang-bot commented on 2019-04-08T08:10:42Z

dlang/druntime pull request #1982 "Make deprecation warnings compile errors" was merged into master:

- 9b706b935f5f234ffa7fb95334066ab47dc1527c by Sebastian Wilzbach:
  Workaround Issue 19789: add a copy of _assertThrown

https://github.com/dlang/druntime/pull/1982

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

No branches or pull requests

1 participant