Wow. Well, I can explain this, but I'm not happy to see it. The explanation, clearly, is autoboxing. In pre-Tiger
Java, both expressions are errors, because, as Jeroen says, both branches of the conditional have to have the same type.
But under Tiger, we have autoboxing. The compiler knows that both expressions can be promoted to Objects by autoboxing, so the first expression works. The second one doesn't because if you box '4.0' you get a Double, and if you box 'true' you get a Boolean, and neither of these is a String.
I think this is terrible, because it seems so arbitrary. You and I both know you can trivially make a String out of a double and a boolean with String constructors or String.valueOf() methods, or calling toString() on the Double and the Boolean, and it intuitively feels like the compiler ought to just do it for you. But of course, that's not how autoboxing works -- the compiler knows how to turn a boolean into a Boolean, and nothing else.