Bug 15062 – ElementType Causes Abnormally Long Compile Time

Status
RESOLVED
Resolution
DUPLICATE
Severity
normal
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2015-09-15T17:37:00Z
Last change time
2015-09-16T00:16:48Z
Keywords
performance
Assigned to
nobody
Creator
monkeyworks12

Comments

Comment #0 by monkeyworks12 — 2015-09-15T17:37:02Z
import std.range; import std.array; import std.conv; import std.algorithm; import std.string; import std.stdio; enum Instructions: ushort { add = 123, sub = 124, } uint[ushort.max] inst; void initInst() { //Removing this line drastically reduces compile time alias InstElem = ElementType!(typeof(inst)); } void main() { }
Comment #1 by ag0aep6g — 2015-09-15T17:57:50Z
Reduced: alias R = uint[ushort.max]; void front(T)(T[] a) {} void main() {front(R.init);}
Comment #2 by k.hara.pg — 2015-09-16T00:16:48Z
*** This issue has been marked as a duplicate of issue 14886 ***