D issues are now
tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Summary: |
Segfault with import of invalid template |
Product: |
D
|
Reporter: |
Robert Clipsham <robert> |
Component: |
dmd | Assignee: |
No Owner <nobody> |
Status: |
RESOLVED
FIXED
|
Severity: |
normal
|
CC: |
bugzilla
|
Priority: |
P2
|
Keywords: |
ice-on-valid-code |
Version: |
D2 |
Hardware: |
Other |
OS: |
All |
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.