J
Jon Skeet [C# MVP]
No, actually I wouldn't expect that to pass. I agree that you don't need
to know the actual input values of a and b to resolve the question, but it
goes beyond what I expect the compiler to do.
<snip>
Out of interest (and not in any way trying to sound snide) do you know
of any languages/compilers which prevent access to possibly-unassigned
variables in this kind of way? I'm pretty sure Java's rules are similar
to C#'s. I don't recall it being part of the C/C++ spec at all,
although I'm much less familiar with those.
I do feel sorry for language designers when it comes to things like
this - they're never going to please everyone