digitalmars.D.bugs - [Issue 21391] New: deprecated doesn't work for mixin templates
- d-bugmail puremagic.com (40/40) Nov 13 2020 https://issues.dlang.org/show_bug.cgi?id=21391
https://issues.dlang.org/show_bug.cgi?id=21391 Issue ID: 21391 Summary: deprecated doesn't work for mixin templates Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: normal Priority: P1 Component: dmd Assignee: nobody puremagic.com Reporter: mrsmith33 yandex.ru Minimal test case (1 deprecation expected): ``` void main(string[] args) {} mixin Test!("hello", 42); deprecated mixin template Test(Args...){ int b; } ``` Complex test case. No deprecation messages occur (2 expected) ``` // Check for local and static template mixins void main(string[] args) { mixin Test!("hello", 42); mixin Test!(Foo()); // deprecated expected mixin Test!(50.0, 42); a = b + c + .a + .b + .c; } mixin Test!("hello", 42); mixin Test!(Foo()); // deprecated expected mixin Test!(50.0, 42); struct Foo {} // 3 overloads, so any ordering works mixin template Test(double num, Args...){ int a; } deprecated mixin template Test(Args...){ int b; } mixin template Test(string str, Args...){ int c; } ``` No deprecation messages are issued by the compiler here. --
Nov 13 2020