This compiles successfully, but I don't think it should. //--------- void bar () { foo (); // should fail } version(none): void foo () {} //--------- $ gdmd -c test.d //---------
There is an error with that extra colon, after the version: version(none) void foo () {} none.d:3: undefined identifier foo none.d:3: function expected before (), not foo of type int version(none) { void foo () {} } none.d:3: undefined identifier foo none.d:3: function expected before (), not foo of type int However, maybe having the colon should be made an error ?
(In reply to comment #1) > There is an error with that extra colon, after the version: > > version(none) > void foo () {} > > none.d:3: undefined identifier foo > none.d:3: function expected before (), not foo of type int > > version(none) > { > void foo () {} > } > > none.d:3: undefined identifier foo > none.d:3: function expected before (), not foo of type int > > However, maybe having the colon should be made an error ? > I know. This bug is actually very old, but has been ignored: 2004年10月06日: http://www.digitalmars.com/pnews/read.php?server=news.digitalmars.com&group=digitalmars.D.bugs&artnum=2039 2004年12月31日: http://www.digitalmars.com/pnews/read.php?server=news.digitalmars.com&group=digitalmars.D.bugs&artnum=2631 2006年06月20日: http://www.digitalmars.com/pnews/read.php?server=news.digitalmars.com&group=digitalmars.D.bugs&artnum=7625
This is an issue with DMD's frontend/documentation and not specific to GDC.
Fixed DMD 1.018 and DMD 2.002
AltStyle によって変換されたページ (->オリジナル) / アドレス: モード: デフォルト 音声ブラウザ ルビ付き 配色反転 文字拡大 モバイル