www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 21259] New: struct initialization with deprecated fields

https://issues.dlang.org/show_bug.cgi?id=21259

          Issue ID: 21259
           Summary: struct initialization with deprecated fields should
                    issue deprecation warnings
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: greeenify gmail.com

---
struct Foo {
    int bar;   
    deprecated alias width = foo;
}

void main()
{
    Foo s = { width: 100};
}
---

This should print a "`width` is deprecated" message.

--
Sep 17 2020