Bug 7178 – Segfault with import of invalid template
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
Other
OS
All
Creation time
2011-12-28T10:34:00Z
Last change time
2012-01-28T20:46:02Z
Keywords
ice-on-valid-code
Assigned to
nobody
Creator
robert
Comments
Comment #0 by robert — 2011-12-28T10:34:52Z
a.d:
----
static if(is(typeof({import typecons;}()))){
}
----
typecons.d:
----
template populate(overloads...)
{
mixin populate!(.contents);
}
public mixin populate!int;
----
With the above code, dmd segfaults when using "dmd -c a.d". While typecons.d is invalid, a.d is valid, and it should compile regardless of the validity of typecons. Note that this can probably be triggered with valid code in typecons.d as it was reduced from std.typecons.
Comment #1 by github-bugzilla — 2012-01-28T20:44:30Z