Jesse Phillips:
> D uses the last element in the array literal to select the type.
That's not true, this doesn't assert:
import std.stdio: writeln;
void main() {
auto a = [1, 1.5, 2];
assert(is(typeof(a) == double[]));
}
I think it uses ?: on all elements, to infer the type.
Bye,
bearophile