Sample code: -------- class SampleClass { void foo() {} shared void foo() {} void bar() { foo(); } } -------- Result with dmd 2.039: -------- test.d(10): Error: function test.SampleClass.foo called with argument types: (()) matches both: test.SampleClass.foo() and: test.SampleClass.foo() -------- I think that no shared 'foo' method should be called in 'bar' method. If 'foo' method is called from 'this' pointer explicitly, dmd compile successfully. -------- void bar() { this.foo(); } --------
*** Issue 4392 has been marked as a duplicate of this issue. ***
This applies to any this modifier, not just shared.
https://github.com/D-Programming-Language/dmd/pull/534
*** Issue 7276 has been marked as a duplicate of this issue. ***
https://github.com/D-Programming-Language/dmd/commit/9aea891987a8c58b3c02c6d32f28a12c579400f3