Bug 7276 – ambugious method call with shared / const / immutable

Status
RESOLVED
Resolution
DUPLICATE
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
Other
OS
Windows
Creation time
2012-01-11T22:50:00Z
Last change time
2012-01-11T23:07:19Z
Assigned to
nobody
Creator
code

Comments

Comment #0 by code — 2012-01-11T22:50:47Z
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.
Comment #1 by k.hara.pg — 2012-01-11T23:07:19Z
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 ***