src/com/google/javascript/rhino/jstype/UnionType.java
/**
   * This predicate is used to test whether a given type can appear in a
   * {@code String} context, such as an operand of a string concat ({@code +})
   * operator.<p>
   *
   * All types have at least the potential for converting to {@code String}.
   * When we add externally defined types, such as a browser OM, we may choose
   * to add types that do not automatically convert to {@code String}.
   *
   * @return {@code true} if not {@link VoidType}
   */
This predicate is used to test whether a given type can appear in a
String context, such as an operand of a string concat ( +)
operator.

All types have at least the potential for converting to  String.
When we add externally defined types, such as a browser OM, we may choose
to add types that do not automatically convert to  String.

@return  true if not  VoidType
This predicate is used to test whether a given type can appear in a String context such as an operand of a string concat ( + ) operator . All types have at least the potential for converting to String . When we add externally defined types such as a browser OM we may choose to add types that do not automatically convert to String . @return true if not VoidType
@Override
  public boolean matchesStringContext() {
    return anyMatch(JSType::matchesStringContext, alternatesRetainingStructuralSubtypes);
  }
@ Override public boolean matchesStringContext ( ) { return anyMatch ( JSType :: matchesStringContext , alternatesRetainingStructuralSubtypes ) ; }
This predicate is used to test whether a given type can appear in a
 {@code String} context, such as an operand of a string concat ({@code +})
 operator.<p>
This predicate is used to test whether a given type can appear in a { @code String } context such as an operand of a string concat ( { @code + } ) operator . <p >
// TODO(user): Reverse this logic to make it correct instead of generous.