in src/main/java/org/apache/sling/scripting/sightly/java/compiler/impl/TypeInference.java [127:135]
public Type evaluate(TernaryOperator ternaryOperator) {
infer(ternaryOperator.getCondition());
Type thenType = infer(ternaryOperator.getThenBranch());
Type elseType = infer(ternaryOperator.getElseBranch());
if (thenType.equals(elseType)) {
return thenType;
}
return Type.UNKNOWN;
}