private DataType resolveForwards(TypeContext context) {
        var type = getInputType(context);
        for (var expression : expressions()) {
            type = expression.setInputType(type, context);
            type = expression.assignOutputType(type);
            if (type == null) break;
        }
        return type;
    }
Resolves types forward and returns the final output, or null if resolution could not progress to the end.
indexinglanguage/src/main/java/com/yahoo/vespa/indexinglanguage/expressions/StatementExpression.java