@@ -166,8 +166,8 @@ class CompileTimeConstantExpr extends Expr {
166166 // The ternary conditional operator ` ? : `.
167167 exists ( ConditionalExpr e | this = e |
168168 e .getCondition ( ) .isCompileTimeConstant ( ) and
169- e .getTrueExpr ( ) .isCompileTimeConstant ( ) and
170- e .getFalseExpr ( ) .isCompileTimeConstant ( )
169+ e .getThen ( ) .isCompileTimeConstant ( ) and
170+ e .getElse ( ) .isCompileTimeConstant ( )
171171 )
172172 or
173173 // Access to a final variable initialized by a compile-time constant.
@@ -1463,27 +1463,43 @@ class ConditionalExpr extends Expr, @conditionalexpr {
14631463 /** Gets the condition of this conditional expression. */
14641464 Expr getCondition ( ) { result .isNthChildOf ( this , 0 ) }
14651465
1466+ /**
1467+ * DEPRECATED: Use getThen() instead.
1468+ *
1469+ * Gets the expression that is evaluated if the condition of this
1470+ * conditional expression evaluates to `true`.
1471+ */
1472+ deprecated Expr getTrueExpr ( ) { result .isNthChildOf ( this , 1 ) }
1473+
1474+ /**
1475+ * DEPRECATED: Use getElse() instead.
1476+ *
1477+ * Gets the expression that is evaluated if the condition of this
1478+ * conditional expression evaluates to `false`.
1479+ */
1480+ deprecated Expr getFalseExpr ( ) { result .isNthChildOf ( this , 2 ) }
1481+
14661482 /**
14671483 * Gets the expression that is evaluated if the condition of this
14681484 * conditional expression evaluates to `true`.
14691485 */
1470- Expr getTrueExpr ( ) { result .isNthChildOf ( this , 1 ) }
1486+ Expr getThen ( ) { result .isNthChildOf ( this , 1 ) }
14711487
14721488 /**
14731489 * Gets the expression that is evaluated if the condition of this
14741490 * conditional expression evaluates to `false`.
14751491 */
1476- Expr getFalseExpr ( ) { result .isNthChildOf ( this , 2 ) }
1492+ Expr getElse ( ) { result .isNthChildOf ( this , 2 ) }
14771493
14781494 /**
14791495 * Gets the expression that is evaluated by the specific branch of this
1480- * conditional expression. If `true` that is `getTrueExpr ()`, if `false`
1481- * it is `getFalseExpr ()`.
1496+ * conditional expression. If `true` that is `getThen ()`, if `false`
1497+ * it is `getElse ()`.
14821498 */
14831499 Expr getBranchExpr ( boolean branch ) {
1484- branch = true and result = this .getTrueExpr ( )
1500+ branch = true and result = this .getThen ( )
14851501 or
1486- branch = false and result = this .getFalseExpr ( )
1502+ branch = false and result = this .getElse ( )
14871503 }
14881504
14891505 /**
0 commit comments