Building the following code with DMD 2.059head fails in ICE. MESSAGE: Assertion failure: '0' on line 277 in file 'tocsym.c' DMD2.058 works. ------------------------------------ struct File { ~this(){} } struct ByLine { File file; // foreach interface @property bool empty() const { return true; } @property char[] front() { return null; } void popFront(){} } void main() { int dummy; ByLine f; foreach (l; f) { scope(failure) // 'failure' or 'success' fails, but 'exit' works dummy = -1; dummy = 0; } }
It is caused by fixing bug 6659.
https://github.com/D-Programming-Language/dmd/pull/862
Commit pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/a81c5dfc7e4aca216caaae9befb67c010bfe4a0a Merge pull request #862 from 9rnsr/fix7814 Issue 7814 - ICE(tocsym.c) using scope(failure) within foreach-range
AltStyle によって変換されたページ (->オリジナル) / アドレス: モード: デフォルト 音声ブラウザ ルビ付き 配色反転 文字拡大 モバイル