D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 8019 - (D1 only) can't convert [] to int[]
Summary: (D1 only) can't convert [] to int[]
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D1 (retired)
Hardware: All All
: P2 normal
Assignee: No Owner
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-05-02 21:55 UTC by Musashi Tamura
Modified: 2013-11-28 14:26 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Musashi Tamura 2012-05-02 21:55:54 UTC
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 Simen Kjaeraas 2013-11-28 14:26:04 UTC
Works in 2.064.