Bug 14876 – Deprecation message is sometimes duplicated
Status
RESOLVED
Resolution
FIXED
Severity
minor
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2015-08-06T09:53:00Z
Last change time
2017-07-22T12:36:21Z
Keywords
diagnostic, pull
Assigned to
nobody
Creator
k.hara.pg
Comments
Comment #0 by k.hara.pg — 2015-08-06T09:53:39Z
Test case:
deprecated class Dep { class Mem {} }
alias X1 = Foo!(Dep[]); // Line 3
alias X2 = Foo!(Dep[1]); // Line 4
alias X3 = Foo!(Dep[int]); // Line 5
alias X4 = Foo!(int[Dep]); // Line 6
alias X5 = Foo!(Dep*); // Line 7
alias X6 = Foo!(Dep.Mem); // Line 8
alias X7 = Foo!(Dep[3..4]); // Line 9
template Foo(T) {}
Current output:
test.d(3): Deprecation: class test.Dep is deprecated
test.d(3): Deprecation: class test.Dep is deprecated
test.d(4): Deprecation: class test.Dep is deprecated
test.d(4): Deprecation: class test.Dep is deprecated
test.d(4): Deprecation: class test.Dep is deprecated
test.d(5): Deprecation: class test.Dep is deprecated
test.d(6): Deprecation: class test.Dep is deprecated
test.d(7): Deprecation: class test.Dep is deprecated
test.d(8): Deprecation: class test.Dep is deprecated
test.d(9): Deprecation: class test.Dep is deprecated
test.d(9): Deprecation: class test.Dep is deprecated
test.d(9): Error: can only slice tuple types, not test.Dep