Repro case: class Repro { int data() { return 0; } int data() const { return 1; } int data() shared { return 2; } int data() immutable { return 3; } int opSlice() { return data(); } int opSlice() const { return data(); } int opSlice() shared { return data(); } int opSlice() immutable { return data(); } } The calls inside opSlice are ambugious accodring to the compiler. If you replace the call with data() with this.data() everything works fine.
This is same as bug 3733. And I've posted a patch to fix them. *** This issue has been marked as a duplicate of issue 3733 ***