Bug 19540 – ICE when using `typeof(new class {})` as default value for template parameter
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
x86_64
OS
Linux
Creation time
2019-01-02T23:15:27Z
Last change time
2019-04-25T13:18:13Z
Keywords
ice, pull
Assigned to
No Owner
Creator
ag0aep6g
Comments
Comment #0 by ag0aep6g — 2019-01-02T23:15:27Z
Crashes DMD (segfault):
----
alias inst = templ!();
template templ(T = typeof(new class {})) {}
----
Tested with DMD64 D Compiler v2.084.0.
Comment #1 by dlang-bot — 2019-04-25T11:33:16Z
@kubo39 created dlang/dmd pull request #9695 "Fix Issue 19540 - ICE when using `typeof(new class {})` as default value" fixing this issue:
- Fix Issue 19540 - ICE when using `typeof(new class {})` as default value
for template parameter
https://github.com/dlang/dmd/pull/9695
Comment #2 by dlang-bot — 2019-04-25T13:18:13Z
dlang/dmd pull request #9695 "Fix Issue 19540 - ICE when using `typeof(new class {})` as default value" was merged into stable:
- f879b969013775a04a442546397c9e92a5a0c037 by Hiroki Noda:
Fix Issue 19540 - ICE when using `typeof(new class {})` as default value
for template parameter
https://github.com/dlang/dmd/pull/9695