Class TypeMismatch

java.lang.Object
com.google.javascript.jscomp.TypeMismatch
All Implemented Interfaces:
Serializable

public abstract class TypeMismatch extends Object implements Serializable
Signals that the first type and the second type have been used interchangeably.

Type-based optimizations should take this into account so that they don't wreck code with type warnings.

See Also:
  • Constructor Details

    • TypeMismatch

      public TypeMismatch()
  • Method Details

    • getFound

      public abstract JSType getFound()
      The RHS type; the type of the assignment target.
    • getRequired

      public abstract JSType getRequired()
      The LHS type; the type being assigned.
    • getLocation

      public abstract Node getLocation()
      The location of the assignment.
    • createForTesting

      public static TypeMismatch createForTesting(JSType found, JSType required)