Summary: Broken deprecated feature with template function
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: rejects-valid
          Severity: normal
          Priority: P2
         Component: DMD

--- Comment #0 from Kenji Hara <> 2012-03-01 06:00:00 PST ---
I think following code should compile with and without -d switch.

void main(){}

void foo(T)(T t){}  // line 3

deprecated struct S{}

deprecated void test()
    S s;
    foo(s);   // line 10
    // foo is instantiated with deprecated struct S.

command line
dmd -run test.d

test.d(3): Error: struct test.S is deprecated
test.d(10): Error: template instance!(S) error instantiating

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to