Bug 10558 – Assertion failure on struct.c:741

Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-07-06T11:10:00Z
Last change time
2013-07-08T03:45:25Z
Keywords
ice, pull
Assigned to
nobody
Creator
youxkei

Comments

Comment #0 by youxkei — 2013-07-06T11:10:05Z
template Template(){} struct Struct(alias T){} alias bar = foo!(Template!()); template foo(alias T) { alias foobar = Struct!T; void fun() { alias a = foo!T; } } The above code compiled, dmd v2.064-devel-3df7dab outputs: dmd: struct.c:741: virtual void StructDeclaration::semantic(Scope*): Assertion `type->ty != Tstruct || ((TypeStruct *)type)->sym == this' failed.
Comment #1 by k.hara.pg — 2013-07-07T18:36:54Z
Comment #2 by k.hara.pg — 2013-07-07T18:37:44Z
This is a regression on 2.064 alpha (git head only).
Comment #3 by github-bugzilla — 2013-07-08T03:45:14Z
Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/ec1330d512707160628a2b235677cd36a63d390b fix Issue 10558 - Assertion failure on struct.c:741 A template instance on temlpate argument may not have yet valid `Dsymbol::ident`, so should use `Dsymbol::getIdent()` for hash calculation. https://github.com/D-Programming-Language/dmd/commit/c0c21f378467fab8e1ba933ccbdcd05336ee33b4 Merge pull request #2314 from 9rnsr/fix10558 [REG2.064a] Issue 10558 - Assertion failure on struct.c:741