class Sample { void method() {} shared void method() {} } class Sample2 : Sample { override void method() {} override shared void method() {} // Line 10 } 2.037 succeeds in compiling this code, but 2.038 and 2.039 fail. 2.039 outputs following error message: foo.d(10): Error: function foo.Sample2.method of type shared void() overrides but is not covariant with foo.Sample2.method of type void() For that matter, following code is minimum sample which same error occurs. class Sample { void method() {} } class Sample2 : Sample { shared void method() {} }
The first example compiles correctly with dmd 2.041. The second example correctly fails, because shared cannot override an unshared method.