comipiling ---- const PM_QS_INPUT = QS_INPUT; const QS_INPUT = 2; ---- produces: test.d(1): Error: forward reference of variable QS_INPUT Here's a patch: Index: expression.c =================================================================== --- expression.c (revision 421) +++ expression.c (working copy) @@ -2395,7 +2395,9 @@ { //printf("Identifier '%s' is a variable, type '%s'\n", toChars(), v->type->toChars()); if (!type) - { type = v->type; + { if (!v->type && v->scope) + v->semantic(v->scope); + type = v->type; if (!v->type) { error("forward reference of %s %s", v->kind(), v->toChars()); type = Type::terror;
changeset 481
Fixed DMD2.046.
AltStyle によって変換されたページ (->オリジナル) / アドレス: モード: デフォルト 音声ブラウザ ルビ付き 配色反転 文字拡大 モバイル