Bug 8019 – (D1 only) can't convert [] to int[]

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D1 (retired)
Platform
All
OS
All
Creation time
2012-05-02T21:55:00Z
Last change time
2013-11-28T14:26:04Z
Assigned to
nobody
Creator
yuri.musashi.miwa.tamura

Comments

Comment #0 by yuri.musashi.miwa.tamura — 2012-05-02T21:55:54Z
void main() { int i; int[] a; a = i ? [] : [1]; } bug.d(4): Error: cannot implicitly convert expression (i ? [] : cast(void[])[1]) of type void[] to int[] This error is present in 1.074, not in 1.070 and 2.059.
Comment #1 by simen.kjaras — 2013-11-28T14:26:04Z
Works in 2.064.