Bug 411 – array alloc with size from another array
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D1 (retired)
Platform
x86
OS
Linux
Creation time
2006-10-08T19:18:00Z
Last change time
2014-02-15T13:20:13Z
Assigned to
bugzilla
Creator
benoit
Comments
Comment #0 by benoit — 2006-10-08T19:18:12Z
void main(){
int[] ia;
ia ~= 3;
byte[] data = new byte[ia[0]]; // line 5
byte[] data2 = new byte[ cast(int)(ia[s])]; // this compiles
}
a.d(5): need size of rightmost array, not type ia[0]