Bug 14554 – [REG2.066] dmd generate wrong error message for multiple template with same name

Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2015-05-07T12:04:00Z
Last change time
2015-06-17T21:05:26Z
Keywords
diagnostic, pull
Assigned to
nobody
Creator
kozzi11

Comments

Comment #0 by kozzi11 — 2015-05-07T12:04:40Z
// test.d struct S { void foo(T)(int j) {} static void foo(T)(int j) {} } void main() { S.foo!bool(1); } 2.067: test.d(8): Error: need 'this' for 'foo' of type '(int j)' 2.066: test.d(8): Error: need 'this' for 'foo' of type 'pure nothrow @nogc @safe void(int j)' 2.063: test.d(8): Error: template test.S.foo matches more than one template declaration, test.d(2):foo(T)(int j) and test.d(3):foo(T)(int j) test.d(8): Error: need 'this' for 'foo' of type 'pure nothrow @safe void(int j)' // test2.d struct S { static void foo(T)(int j) {} void foo(T)(int j) {} } void main() { S.foo!bool(1); } 2.067: test2.d(8): Error: need 'this' for 'foo' of type '(int j)' 2.066: test2.d(8): Error: test2.S.foo called with argument types (int) matches both: test2.d(2): test2.S.foo!bool.foo(int j) and: test2.d(3): test2.S.foo!bool.foo(int j) 2.063: test2.d(8): Error: template test2.S.foo matches more than one template declaration, test2.d(2):foo(T)(int j) and test2.d(3):foo(T)(int j) some more info: http://forum.dlang.org/post/[email protected]
Comment #1 by dlang-bugzilla — 2015-05-07T14:40:07Z
Comment #2 by kozzi11 — 2015-05-25T12:00:54Z
Comment #3 by github-bugzilla — 2015-05-26T03:19:16Z
Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/3bc87563d4c276015848c216e799133fafd46f18 fix: Issue 14554 - [REG2.066] dmd generate wrong error message for multiple template with same name https://github.com/D-Programming-Language/dmd/commit/1c2f164a91fe384c1905ad871e7f38f89b7505b7 Merge pull request #4681 from Kozzi11/Issue_14554 fix: Issue 14554 - [REG2.066] dmd generate wrong error message for multiple template with same name
Comment #4 by github-bugzilla — 2015-06-17T21:05:26Z
Commits pushed to stable at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/3bc87563d4c276015848c216e799133fafd46f18 fix: Issue 14554 - [REG2.066] dmd generate wrong error message for multiple template with same name https://github.com/D-Programming-Language/dmd/commit/1c2f164a91fe384c1905ad871e7f38f89b7505b7 Merge pull request #4681 from Kozzi11/Issue_14554