PolyType

tastyquery.Types.PolyType
See thePolyType companion object

Attributes

Companion
object
Graph
Supertypes
trait LambdaType
trait TypeBinder
class MethodicType
class TermType
class TypeMappable
class Object
trait Matchable
class Any
Show all

Members list

Type members

Types

type This = PolyType

Inherited types

type PInfo = TypeBounds

Attributes

Inherited from:
TypeLambdaType

Attributes

Inherited from:
TypeLambdaType

Attributes

Inherited from:
TypeLambdaType

Value members

Concrete methods

final def asSeenFrom(pre: Prefix, cls: Symbol)(using Context): PolyType
override def toString: String

Returns a string representation of the object.

Returns a string representation of the object.

The default representation is platform dependent.

Attributes

Returns

a string representation of the object.

Definition Classes
Any

Inherited methods

Attributes

Inherited from:
MethodicType
final def instantiate(args: List[TypeOrWildcard])(using Context): ResultType

Attributes

Inherited from:
TypeLambdaType
final def instantiateParamTypeBounds(args: List[Type])(using Context): List[TypeBounds]

Attributes

Inherited from:
TypeLambdaType
final def isSubTypeOrMethodic(that: TypeOrMethodic)(using Context): Boolean

Attributes

Inherited from:
TypeOrMethodic
final def matches(that: TypeOrMethodic)(using Context): Boolean

Is this type close enough to that type so that members with the two types would override each other?

Is this type close enough to that type so that members with the two types would override each other?

This means:

  • Either both types are polytypes with the same number of type parameters and their result types match after renaming corresponding type parameters
  • Or both types are method types with =:=-equivalent(*) parameter types and matching result types after renaming corresponding parameter types if the method types are dependent.
  • Or both types are =:=-equivalent
  • Or neither type takes term or type parameters.

(*) when matching with a Java method, we also regard Any and Object as equivalent parameter types. (TODO)

This function will always use unsafe-nulls semamtics to check the types. This is because we are using a relaxed rule (ignoring Null types) to check overriding Java methods.

Attributes

Inherited from:
TypeOrMethodic
protected def newParamRef(n: Int): ParamRefType

Attributes

Inherited from:
TypeLambdaType
final def paramInfos: List[PInfo]

Attributes

Inherited from:
TypeLambdaType

Attributes

Inherited from:
TypeMappable
def showBasic: String

Attributes

Inherited from:
TypeMappable
final def showMultiline: String

Attributes

Inherited from:
TypeMappable
final def widenTermRef(using Context): TermType

Widens TermRefs one level to their underlyingOrMethodic type.

Widens TermRefs one level to their underlyingOrMethodic type.

  • If this term type is a TermRef, returns this.underlyingOrMethodic.
  • Otherwise, returns this.

Attributes

Inherited from:
TermType

Concrete fields

val paramNames: List[TypeName]

Inherited fields

val paramRefs: List[ParamRefType]

Attributes

Inherited from:
LambdaType