Closed
Description
Description
When diagnostics are generated for ternary expressions where the :
is missing but both of the first and second choice expressions are present, the incorrect diagnostic message is used and the wrong Fix-It is applied.
Steps to Reproduce
Example:
foo ? 1 2
This results in the following diagnostic message and Fix-It:
expected ':' and expression after '? ...' in ternary expression
foo ? 1 : <#expression#>2
As the expression isn't missing in the example I expected the following diagnostic message and Fix-It:
expected ':' after '? ...' in ternary expression
foo ? 1 : 2