Hello all.
I try to use NVI and failed with a snippet from TDPL:
interface Transmogrifier
{
final void thereAndBack()
{
transmogrify();
untransmogrify();
}
private:
void transmogrify();
void untransmogrify();
}
class CardboardBox: Transmogrifier
{
override private void transmogrify() { }
override void untransmogrify() {}
}
int main()
{
auto cb = new CardboardBox();
return 0;
}
doesn't compile with log info:
src/test.d(16): Error: function test.CardboardBox.transmogrify cannot
override a non-virtual function
src/test.d(17): Error: function test.CardboardBox.untransmogrify does
not override any function, did you mean to override
'test.Transmogrifier.untransmogrify'?
It rather well differs from what I expected reading TDPL. Something is
changed very much or I just missed something?