Consider: class A { void fun(int) {} } class B : A { void fun(int x) in { assert(x > 0); } body {} } In this case B's in contract is never called. The compiler should disallow the code. To make the code work, an empty "in" contract on A.fun should suffice. The error message should mention that.
https://github.com/D-Programming-Language/dmd/pull/196
https://github.com/D-Programming-Language/dmd/commit/c8b18c01ca47fbe1b140e368418da50d93205b4d https://github.com/D-Programming-Language/dmd/commit/a5bc620cd0a6a109273332175d3430f747e675e7
Reopened as currently the code is still accepted. Perhaps pull 207 needs to be merged first. https://github.com/D-Programming-Language/dmd/pull/207
https://github.com/D-Programming-Language/dmd/commit/e52066fbfcaf9cc0879f0665e2b11f23d209494d
AltStyle によって変換されたページ (->オリジナル) / アドレス: モード: デフォルト 音声ブラウザ ルビ付き 配色反転 文字拡大 モバイル