Dotty Documentation

0.6.0-bin-SNAPSHOT

trait TypeOps
extends Object

[-] Constructors

[-] Members

[+] class AsSeenFromMap

The TypeMap handling the asSeenFrom

[+] class SimplifyMap
[+] type BoundsViolation = ( Tree, String, Type )

An argument bounds violation is a triple consisting of - the argument tree - a string "upper" or "lower" indicating which bound is violated - the violated bound

[+] final def asSeenFrom ( tp: Type , pre: Type , cls: Symbol ) : Type

The type tp as seen from prefix pre and owner cls. See the spec for what this means.

[+] def boundsViolations ( args: List [ Tree ] , boundss: List [ TypeBounds ] , instantiate: (Type, List [ Type ]) => Type ) ( implicit ctx: Context ) : List [ BoundsViolation ]

The list of violations where arguments are not within bounds.

[+] def canAutoTuple : Boolean

Is auto-tupling enabled?

[+] def dynamicsEnabled : Boolean
[+] def featureEnabled ( owner: ClassSymbol , feature: TermName ) : Boolean

Is feature enabled in class owner? This is the case if one of the following two alternatives holds:

  1. The feature is imported by a named import

    import owner.feature

(the feature may be bunched with others, or renamed, but wildcard imports don't count).

  1. The feature is enabled by a compiler option

    • language:feature

where is the full name of the owner followed by a "." minus the prefix "dotty.language.".

[+] private def isLegalPrefix ( pre: Type ) ( implicit ctx: Context ) : Boolean
[+] def makePackageObjPrefixExplicit ( tpe: NamedType ) : Type

If tpe is of the form p.x where p refers to a package but x is not owned by a package, expand it to

p.package.x
[+] def orDominator ( tp: Type ) : Type

Approximate union type by intersection of its dominators. That is, replace a union type Tn | ... | Tn by the smallest intersection type of base-class instances of T1,...,Tn. Example: Given

trait C[+T]
trait D
class A extends C[A] with D
class B extends C[B] with D with E

we approximate A | B by C[A | B] with D

[+] def scala2Mode : Boolean
[+] final def simplify ( tp: Type , theMap: SimplifyMap ) : Type

Implementation of Types#simplified

[+] def testScala2Mode ( msg: => Message , pos: Position , rewrite: => Unit ) : Boolean