// 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/lyieypbmuyfumvccsxes@forum.dlang.org
Introduced in https://github.com/D-Programming-Language/dmd/pull/2417
https://github.com/D-Programming-Language/dmd/pull/4681
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
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