https://issues.dlang.org/show_bug.cgi?id=20474
Issue ID: 20474
Summary: Deprecation warnings inside deprecated function
template
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P1
Component: dmd
Assignee: [email protected]
Reporter: [email protected]
DMD issues deprecation warnings when compiling the following programm:
---------------
deprecated struct S {}
deprecated void foo()(S par)
{
S var;
}
deprecated void main()
{
foo(S.init);
}
---------------
onlineapp.d(3): Deprecation: struct onlineapp.S is deprecated
onlineapp.d(3): Deprecation: struct onlineapp.S is deprecated
---------------
It wont produce any warnings if foo is a normal function instead of a template.
The duplicate warning is another issue probably related to 20467
--