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
Comment #1 by k.hara.pg — 2015-08-06T11:07:53Z
Comment #2 by github-bugzilla — 2015-08-08T05:43:46Z
Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/d83017aac59bbe7aec516beaa447c994b86e5784 fix Issue 14876 - Deprecation message is sometimes duplicated https://github.com/D-Programming-Language/dmd/commit/9c8a2604da7c643bdb95c4ca7566694d7e8de370 Merge pull request #4865 from 9rnsr/fix_deprecation Issue 14875 & 14876 - improve deprecation message diagnostic
Comment #3 by github-bugzilla — 2017-07-22T12:36:21Z
Commits pushed to dmd-cxx at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/d83017aac59bbe7aec516beaa447c994b86e5784 fix Issue 14876 - Deprecation message is sometimes duplicated https://github.com/dlang/dmd/commit/9c8a2604da7c643bdb95c4ca7566694d7e8de370 Merge pull request #4865 from 9rnsr/fix_deprecation