...ing logging 4.0

はてなブログに移行しました。D言語の話とかいろいろ。

scope interface is not "scope" - dmd2.026

scope interface B {}

scope class D1 : B {}
class D2 : B {} // D2の定義にscopeがなくてよいのがおかしい

void main()
{
	B x = new D1;// scopeがないならエラーになるべき
	B y = new D2;// いろいろおかしい
}

だと思うんだけど,いまいち自信がない.
さらっと読み直した感じ,仕様ではscope interfaceそのものに言及されていないような・・・.
どうしたもんでしょうかね.