public TensorType type(TypeContext<Reference> context) {
        return root.type(context);
    }
Validates the type correctness of the given expression with the given context and
returns the type this expression will produce from the given type context

@throws IllegalArgumentException if this expression is not type correct in this context
searchlib/src/main/java/com/yahoo/searchlib/rankingexpression/RankingExpression.java