Bug 12719 – struct.c:705: virtual void StructDeclaration::semantic(Scope*): Assertion `parent && parent == sc->parent' failed.

Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2014-05-08T21:34:00Z
Last change time
2014-05-13T19:37:59Z
Keywords
ice, pull
Assigned to
nobody
Creator
nilsbossung

Comments

Comment #0 by nilsbossung — 2014-05-08T21:34:30Z
Works with 2.065. --- cat > test.d << code struct A { B!int b(); } struct B(T) { A a; void m() { auto v = B!T.init; } } code dmd -c test.d --- dmd: struct.c:705: virtual void StructDeclaration::semantic(Scope*): Assertion `parent && parent == sc->parent' failed. Aborted (core dumped) ---
Comment #1 by k.hara.pg — 2014-05-09T19:58:33Z
Comment #2 by github-bugzilla — 2014-05-10T21:01:57Z
Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/73028ba9f1ea23417c4e65ecd2cce969b2348f61 fix Issue 12719 - struct.c:705: virtual void StructDeclaration::semantic(Scope*): Assertion `parent && parent == sc->parent' failed. Set `semanticRun` to `PASSsemanticdone;` immediately after the struct size determined. https://github.com/D-Programming-Language/dmd/commit/7f05c8e3aba2e2ca7c59f5ba52279b28461ee130 Merge pull request #3537 from 9rnsr/fix12719 [REG2.066a] Issue 12719 - struct.c:705: virtual void StructDeclaration::semantic(Scope*): Assertion `parent && parent == sc->parent' failed.
Comment #3 by monarchdodra — 2014-05-10T21:38:22Z
I still ice with this, and it passed in 2.065: //---- enum canDoIt(R) = is(typeof(Wrapper!R)); struct Wrapper(R) { R r; static if (canDoIt!R) {} } Wrapper!int a; //----
Comment #4 by k.hara.pg — 2014-05-12T13:32:52Z
(In reply to monarchdodra from comment #3) > I still ice with this, and it passed in 2.065: > > //---- > enum canDoIt(R) = is(typeof(Wrapper!R)); > > struct Wrapper(R) > { > R r; > static if (canDoIt!R) > {} > } > > Wrapper!int a; > //---- https://github.com/D-Programming-Language/dmd/pull/3544
Comment #5 by github-bugzilla — 2014-05-13T19:37:58Z
Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/c3cdae6b97b9dc368cfd78b61d73902b7846db12 fix Issue 12719 - struct.c:705: virtual void StructDeclaration::semantic(Scope*): Assertion `parent && parent == sc->parent' failed. https://github.com/D-Programming-Language/dmd/commit/d02621fbe33c560261dd46192ee1d8bd3453a603 Merge pull request #3544 from 9rnsr/fix12719 Issue 12719 - struct.c:705: virtual void StructDeclaration::semantic(Scope*): Assertion `parent && parent == sc->parent' failed.