class ExplainingTypeComparer
extends TypeComparer

A type comparer that can record traces of subtype operations

Constructors

ExplainingTypeComparer ( initctx: Context )

Members

private val b : StringBuilder
private var indent : Int
private val initctx : Context
private var skipped : Boolean
[+] override def addConstraint ( param: TypeParamRef , bound: Type , fromBelow: Boolean ) : Boolean

Add constraint param <: bound if fromBelow is false, param >: bound otherwise. bound is assumed to be in normalized form, as specified in firstTry and s...

Add constraint param <: bound if fromBelow is false, param >: bound otherwise. bound is assumed to be in normalized form, as specified in firstTry and secondTry of TypeComparer. In particular, it should not be an alias type, lazy ref, typevar, wildcard type, error type. In addition, upper bounds may not be AndTypes and lower bounds may not be OrTypes. This is assured by the way isSubType is organized.

override def compareHkApply2 ( tp1: Type , tp2: HKApply , tycon2: Type , args2: List [ Type ] ) : Boolean

Subtype test for the hk application tp2 = tycon2[args2].

Subtype test for the hk application tp2 = tycon2[args2].

override def copyIn ( ctx: Context ) : TypeComparer

A new type comparer of the same type as this one, using the given context.

A new type comparer of the same type as this one, using the given context.

override def glb ( tp1: Type , tp2: Type ) : Type

The greatest lower bound of two types

The greatest lower bound of two types

[+] override def hasMatchingMember ( name: Name , tp1: Type , tp2: RefinedType ) : Boolean

Does type tp1 have a member with name name whose normalized type is a subtype of the normalized type of the refinement tp2? Normalization is as follows:...

Does type tp1 have a member with name name whose normalized type is a subtype of the normalized type of the refinement tp2? Normalization is as follows: If tp2 contains a skolem to its refinement type, rebase both itself and the member info of tp on a freshly created skolem type.

private def indent_= ( x$1: Int ) : Unit
override def isSubType ( tp1: Type , tp2: Type ) : Boolean
override def lub ( tp1: Type , tp2: Type , canConstrain: Boolean ) : Type
def lub$default$3 : Boolean
private def show ( res: Any ) : String
private def skipped_= ( x$1: Boolean ) : Unit
override def toString : String
override def traceIndented ( str: String ) ( op: => T ) : T

A hook for showing subtype traces. Overridden in ExplainingTypeComparer

A hook for showing subtype traces. Overridden in ExplainingTypeComparer