@Override
    public DataType setOutputType(DataType outputType, TypeContext context) {
        super.setOutputType(outputType, context);

        DataType resolvedType = null;
        boolean resolvedTypeNeverAssigned = true;
        for (var expression : expressions()) {
            DataType inputType = expression.setOutputType(outputType, context);
            resolvedType = resolvedTypeNeverAssigned ? inputType : mostGeneralOf(resolvedType, inputType);
            resolvedTypeNeverAssigned = false;
        }
        return resolvedType != null ? resolvedType : getInputType(context);
    }
An expression which returns the value of the first of a list of subexpressions which
returns a non-null value.

Syntax: sub-expression1 || sub-expression2 || ...

@author bratseth
indexinglanguage/src/main/java/com/yahoo/vespa/indexinglanguage/expressions/ChoiceExpression.java