double? test = true ? null : 1.0;
In my book, this is the same as
if (true) { test = null; } else { test = 1.0; }
Because the compiler can't figure out that for null and 1.0 to be compatible, the values need to be cast to double?. This needs to be explicitly stated.
double? test = true ? (double?) null : 1.0;