← Back to index
|
Original Bugzilla link
Bug 7814 – Regression(2.059head) ICE(tocsym.c) using scope(failure) within foreach-range
Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
x86
OS
Windows
Creation time
2012-04-03T01:34:00Z
Last change time
2012-04-05T14:10:28Z
Keywords
ice, pull
Assigned to
nobody
Creator
kekeniro2
Comments
Comment #0
by kekeniro2 — 2012-04-03T01:34:56Z
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; } }
Comment #1
by k.hara.pg — 2012-04-03T02:38:19Z
It is caused by fixing bug 6659.
Comment #2
by k.hara.pg — 2012-04-03T02:45:43Z
https://github.com/D-Programming-Language/dmd/pull/862
Comment #3
by github-bugzilla — 2012-04-05T13:31:49Z
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