← Back to index
|
Original Bugzilla link
Bug 11062 – inline ice with alias this and opIndexAssign
Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-09-18T03:53:00Z
Last change time
2013-09-20T09:26:03Z
Keywords
ice, pull
Assigned to
nobody
Creator
code
Comments
Comment #0
by code — 2013-09-18T03:53:54Z
cat > bug.d << CODE struct InetHeaderMap { void opIndexAssign(string val, string key) { } } struct HTTPServerResponse { InetHeaderMap headers; } struct FreeListRef { private HTTPServerResponse m_object; @property HTTPServerResponse get() { return m_object; } alias get this; } void foo() { auto res = FreeListRef(); res.headers.opIndexAssign("bar", "foo"); // OK res.headers["foo"] = "bar"; // Bug } CODE dmd -c -inline bug.d ---- DMD v2.064-devel-9a32118 DEBUG Internal error: backend/symbol.c 1036 ---- The bug triggers the assertion 'assert(s->Ssymnum == -1);' in backend/symbol.c(symbol_add).
Comment #1
by k.hara.pg — 2013-09-20T02:37:00Z
(In reply to comment #0) [snip] > > dmd -c -inline bug.d > ---- > DMD v2.064-devel-9a32118 DEBUG > Internal error: backend/symbol.c 1036 > ---- > > The bug triggers the assertion 'assert(s->Ssymnum == -1);' in > backend/symbol.c(symbol_add). Introduced by:
https://github.com/D-Programming-Language/dmd/commit/33ce37d6495aad7a3d6644392cf47e1af9d9d493
Compiler fix:
https://github.com/D-Programming-Language/dmd/pull/2576
Comment #2
by github-bugzilla — 2013-09-20T08:22:27Z
Commits pushed to master at
https://github.com/D-Programming-Language/dmd
https://github.com/D-Programming-Language/dmd/commit/1f5c1434485ed29b4b17a5b548503e164d52e09c
fix Issue 11062 - inline ice with alias this and opIndexAssign
https://github.com/D-Programming-Language/dmd/commit/9eb97f78f59d28ddfc5ea8430d2f2fc0f9c06f7d
Merge pull request #2576 from 9rnsr/fix11062 [REG2.06a] Issue 11062 - inline ice with alias this and opIndexAssign