DMD 2.060:
class OVIC{
int foo()immutable{ return 2; }
int foo()const{ return 2; }
}
class OVIbICSC: OVIC{
override int foo()immutable{ return 2; }
override int foo()const shared{ return 2; }
override int foo()const{ return 2;}
}
The first two child methods override the same parent method, but DMD does not detect this.
Comment #1 by maxim — 2012-09-08T22:46:33Z
Why it is a bug?
Comment #2 by samukha — 2013-01-04T10:14:33Z
(In reply to comment #1)
> Why it is a bug?
Why is it not a bug?
Actually, the first and third methods in the derived class override the base methods. The "const shared" method doesn't override anything. It is an additional entry in vtbl.