Applies to both D1 and D2, at least as far back as 2.040. It's a forward reference error, triggered in this case by CTFE. ------------ class Base6900 { void foo() {} } class Derived6900: Base6900 { override void foo() { } } int test6900() { Derived6900 d = new Derived6900; // for github HEAD // Derived6900 d = null; // for older versions d.foo(); return 1; } static assert(test6900()); ------------ test.d(8): Error: variable test.Derived6900.foo.this override cannot be applied to variable test.d(15): called from here: d.foo() test.d(19): called from here: test6900() test.d(19): Error: static assert (test6900()) is not evaluatable at compile tim e
https://github.com/D-Programming-Language/dmd/commit/366a1d759ed45d2aa4bfcb431a0d1ded1f8cf0fc https://github.com/D-Programming-Language/dmd/commit/a25c281637a5cfdfad7eb55487ebfffca8bd49df
AltStyle によって変換されたページ (->オリジナル) / アドレス: モード: デフォルト 音声ブラウザ ルビ付き 配色反転 文字拡大 モバイル