July 04, 2018 [Issue 19060] New: [REG2.081] Incorrect "Using this as a type is deprecated" error | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=19060 Issue ID: 19060 Summary: [REG2.081] Incorrect "Using this as a type is deprecated" error Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: regression Priority: P1 Component: dmd Assignee: nobody@puremagic.com Reporter: johanengelen@weka.io Testcase: ``` struct S { bool x; public template yoyo() { alias yoyo = this.x; // line 5 } public ref foo() { return yoyo!(); } } ``` Works correctly with dmd < 2.081, fails (incorrect deprecation) with 2.081: ❯ dmd testcase.d -de testcase.d(5): Deprecation: Using this as a type is deprecated. Use typeof(this) instead -- |
Copyright © 1999-2021 by the D Language Foundation