Open jskeet opened 9 years ago
All comments prior to this one were before we removed section 7. I've updated the title only.
Note that currently 12.14 The null coalescing operator mentions dynamic
while 12.15 Conditional operator does not. The former allows for the result type to be dynamic
, the latter still does not mention dynamic.
This issue relates to dynamic and what ends up being evaluated so I'm putting into the dependency group: #119, #118, #117, #116
Some sections - such as 13.13.1 and 13.11.1 - talk about dynamic binding, usually with the same kind of language.
Other sections - such as 13.14 and 13.15 - don't mention it at all. Do we want to fix this inconsistency?
(The conditional operator in 13.15 is interesting, as the precise behaviour would usually require knowledge of both the second and third operand types, to know whether or not to convert an operand into the overall type. However, for dynamic expressions that would require evaluating both of those operands, against the spirit of the operator. So presumably if either of those operands is dynamic, no conversions are performed? That's the sort of thing we should probably specify...)