Fix parsing of nested ternary `?` expressions

Description

The following translation incorrectly detects the type of the inner (nested) ternary expression as `Bool`:
http://swiftify.me/b1jgw2

If we remove the nested ternary expression, it is translated just fine:
http://swiftify.me/b1jgw2/1

The type of the ternary expression is determined by GetBinaryExpressionType() method.

Problem: in the inner ternary expression, the `falseExpression` part includes only

(which indeed returns `Bool`)
... while it should include

(which returns `NSFontTraitMask`):
https://take.ms/6Nw7a

Original customer's report:

The line

was converted to

Environment

None

Activity

Show:
Ivan Kochurkin
February 25, 2019, 2:26 PM

Ternary expressions were being parsed incorrectly. I've fixed it by adding <assoc=right> option.

Assignee

Ivan Kochurkin

Reporter

Alex Petuschak

Labels

None

Git Branch Name

None

GitHub Issue

None

Components

Fix versions

Priority

Medium
Configure