D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 19789 - Lazy expression evaluation doesn't check parent scope for deprecations
Summary: Lazy expression evaluation doesn't check parent scope for deprecations
Status: NEW
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: x86_64 Linux
: P3 normal
Assignee: No Owner
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-04-04 11:13 UTC by Seb
Modified: 2024-12-13 19:02 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Seb 2019-04-04 11:13:49 UTC
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));
}
---
Comment 1 Dlang Bot 2019-04-04 11:17:32 UTC
@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
Comment 2 Dlang Bot 2019-04-08 08:10:42 UTC
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
Comment 3 dlangBugzillaToGithub 2024-12-13 19:02:52 UTC
THIS ISSUE HAS BEEN MOVED TO GITHUB

https://github.com/dlang/dmd/issues/19551

DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB