[Issue 21391] New: deprecated doesn't work for mixin templates
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Fri Nov 13 22:10:59 UTC 2020
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 at puremagic.com
Reporter: mrsmith33 at 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.
--
More information about the Digitalmars-d-bugs
mailing list