Bug 1783 – DMD 1.025 asserts on code with struct, template, and alias
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D1 (retired)
Platform
All
OS
All
Creation time
2008-01-11T20:10:00Z
Last change time
2014-02-24T15:33:19Z
Keywords
ice-on-invalid-code
Assigned to
bugzilla
Creator
wetimermad
Comments
Comment #0 by wetimermad — 2008-01-11T20:10:31Z
The Code:
module test;
template T()
{
}
struct S
{
alias T!() data;
}
unittest
{
S.data.V;
}
The Result:
dmd: mtype.c:4262: virtual Expression* TypeStruct::dotExp(Scope*, Expression*, Identifier*): Assertion `d' failed.
Aborted (core dumped)
I'm running on Ubuntu, using Tango. I have to pass -unittest to induce the failure (naturally)
Comment #1 by matti.niemenmaa+dbugzilla — 2008-01-12T03:12:59Z
The unittest block and V aren't necessary, any access to data is enough:
template T() {}
struct S {
alias T!() data;
}
void main() {
S.data;
}
Comment #2 by matti.niemenmaa+dbugzilla — 2008-01-21T02:55:36Z