[Issue 20474] New: Deprecation warnings inside deprecated function template

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Dec 31 03:21:04 UTC 2019


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: nobody at puremagic.com
          Reporter: moonlightsentinel at disroot.org

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

--


More information about the Digitalmars-d-bugs mailing list