www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 20583] New: no warnings printed when indexing through

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

          Issue ID: 20583
           Summary: no warnings printed when indexing through deprecated
                    alias this
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Keywords: diagnostic
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: elpenguino+D gmail.com

```
unittest {
        struct X {
        int[1] x;
        deprecated alias x this;
        }
    auto y = X()[0];
}
```
The expected deprecation warning is not printed.

--
Feb 15