This is typeof(super) problem. When typeof(this) has some qualifiers (e.g. const, immutable, shared, ...), typeof(super) should have same qualifiers.
I filed this issue into bugzilla. http://d.puremagic.com/issues/show_bug.cgi?id=6848 Kenji Hara 2011/10/25 Andrew Wiley <[email protected]>: > My understanding is that this: > -------- > module test2; > synchronized abstract class Bob { > private: > int _i = 2; > public: > @property > int i() { > return _i; > } > } > synchronized class Bill : Bob { > public: > @property > int thing() { > return i; > } > } > -------- > should be the same as this: > -------- > module test2; > synchronized abstract class Bob { > private: > int _i = 2; > public: > @property > int i() { > return _i; > } > } > synchronized class Bill : Bob { > public: > @property > int thing() { > return super.i(); //test2.d(18): Error: function test2.Bob.i () shared is > not callable using argument types () > } > } > -------- > But the second one gets a compiler error. Bug?
