Comment #0 by bearophile_hugs — 2013-01-11T10:50:50Z
I think this code should compile:
void main() {
auto vec = [1.0, 2]; // OK
auto mat = [[1.0], [2]]; // error
}
Currently dmd v.2.062alpha gives:
test.d(3): Error: incompatible types for (([1]) ? ([2])): 'double[]' and 'int[]'
A person on IRC has suggested that in some cases this is not what you want. Please add some of such examples below.
Comment #1 by robert.schadek — 2024-12-13T18:03:38Z