Bug 14390 – [REG2.068a] ICE or bad "has forward references" error with circular class structure

Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2015-04-01T20:43:00Z
Last change time
2015-06-17T21:04:11Z
Keywords
ice, pull, rejects-valid
Assigned to
nobody
Creator
nilsbossung

Comments

Comment #0 by nilsbossung — 2015-04-01T20:43:10Z
Slight variant of issue 12984. Works in 2.067.0. Feel free to change the title to be more to the point. I can't really wrap my head around all this. --- cat > test.d << code class B {alias MyD = D!int;} class C : B { version(ice) void m() {alias MyD = D;} version(forward_references) static struct S {alias MyD = D;} } class D(T) {alias MyE = E!float;} class E(T) : D!int { void m() {new C;} } code dmd -c -o- -version=ice test.d echo "-" dmd -c -o- -version=forward_references test.d --- dmd: mangle.c:231: void Mangler::mangleFuncType(TypeFunction*, TypeFunction*, unsigned char, Type*): Assertion `0' failed. Aborted (core dumped) - test.d(5): Error: struct test.C.S has forward references ---
Comment #1 by k.hara.pg — 2015-04-03T13:46:42Z
Comment #2 by github-bugzilla — 2015-04-04T20:53:27Z
Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/5346e25de5b1c30ad27a17bfa58fc5e5c6b21d69 fix Issue 14390 - ICE or bad "has forward references" error with circular class structure Class instance size can be determined before the completion of class members semantic. https://github.com/D-Programming-Language/dmd/commit/ddf4a6db97ba38cce5b4e67ea50f6628d4a67562 Merge pull request #4548 from 9rnsr/fix14390 [REG2.068a] Issue 14390 - ICE or bad "has forward references" error with circular class structure
Comment #3 by github-bugzilla — 2015-06-17T21:04:11Z
Commits pushed to stable at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/5346e25de5b1c30ad27a17bfa58fc5e5c6b21d69 fix Issue 14390 - ICE or bad "has forward references" error with circular class structure https://github.com/D-Programming-Language/dmd/commit/ddf4a6db97ba38cce5b4e67ea50f6628d4a67562 Merge pull request #4548 from 9rnsr/fix14390