TypeErasure

dotty.tools.dotc.core.TypeErasure
See theTypeErasure companion object
class TypeErasure(sourceLanguage: SourceLanguage, semiEraseVCs: Boolean, isConstructor: Boolean, isSymbol: Boolean, inSigName: Boolean)

Value parameters

inSigName

This eraser is used for TypeErasure.sigName, see TypeErasure#apply for more information.

isConstructor

Argument forms part of the type of a constructor

isSymbol

If true, the type being erased is the info of a symbol.

semiEraseVCs

If true, value classes are semi-erased to ErasedValueType (they will be fully erased in ElimErasedValueType). If false, they are erased like normal classes.

sourceLanguage

Adapt our erasure rules to mimic what the given language would do.

Attributes

Companion
object
Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

def eraseInfo(tp: Type, sym: Symbol)(using Context): Type

The erasure of a symbol's info. This is different from apply in the way ExprTypes and PolyTypes are treated. eraseInfo maps them them to method types, whereas apply maps them to the underlying type.

The erasure of a symbol's info. This is different from apply in the way ExprTypes and PolyTypes are treated. eraseInfo maps them them to method types, whereas apply maps them to the underlying type.

Attributes

def eraseResult(tp: Type)(using Context): Type

The erasure of a function result type.

The erasure of a function result type.

Attributes