April 04, 2019
https://issues.dlang.org/show_bug.cgi?id=19789

          Issue ID: 19789
           Summary: Lazy expression evaluation doesn't check parent scope
                    for deprecations
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nobody@puremagic.com
          Reporter: greeenify@gmail.com

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));
}
---

--