private void emitConditionalExpression(final Expression expr, final int flags) {
final ConditionalExpression node = (ConditionalExpression) expr;
assert node.getTest().getType() == PrimitiveTypes.Boolean;
final Label ifFalse = generator.defineLabel();
emitExpressionAndBranch(false, node.getTest(), ifFalse);
emitExpressionAsType(node.getIfTrue(), node.getType(), flags);
if (notEmpty(node.getIfFalse())) {
final Label end = generator.defineLabel();
generator.emitGoto(end);
generator.markLabel(ifFalse);
emitExpressionAsType(node.getIfFalse(), node.getType(), flags);