public static TabledDescriptorRenderer renderTypeConstructorMismatchError( final ExtendedInferenceErrorData inferenceErrorData, TabledDescriptorRenderer renderer) { Predicate<ConstraintPosition> isErrorPosition = new Predicate<ConstraintPosition>() { @Override public boolean apply(@Nullable ConstraintPosition constraintPosition) { assert constraintPosition != null; return inferenceErrorData.constraintSystem.hasTypeConstructorMismatchAt( constraintPosition); } }; return renderer.table( TabledDescriptorRenderer.newTable() .descriptor(inferenceErrorData.descriptor) .text("cannot be applied to") .functionArgumentTypeList( inferenceErrorData.receiverArgumentType, inferenceErrorData.valueArgumentsTypes, isErrorPosition)); }