WRONG_TYPE_PARAMETER_VARIANCE_IN_SUPERINTERFACE constant

CompileTimeErrorCode const WRONG_TYPE_PARAMETER_VARIANCE_IN_SUPERINTERFACE

Let C be a generic class that declares a formal type parameter X, and assume that T is a direct superinterface of C. It is a compile-time error if X occurs contravariantly or invariantly in T.

Implementation

WRONG_TYPE_PARAMETER_VARIANCE_IN_SUPERINTERFACE = CompileTimeErrorCode(
    'WRONG_TYPE_PARAMETER_VARIANCE_IN_SUPERINTERFACE',
    "'{0}' can't be used contravariantly or invariantly in '{1}'.",
    correction: "Try not using class type parameters in types of formal "
  "parameters of function types, nor in explicitly contravariant or "
  "invariant superinterfaces.",
  )