Dotty Documentation

0.4.0-bin-SNAPSHOT

class ElimRepeated
extends MiniPhaseTransform with InfoTransformer with AnnotationTransformer

A transformer that removes repeated parameters (T*) from all types, replacing them with Seq types.

[-] Constructors

ElimRepeated ( )

[-] Members

[+] private def addVarArgsBridge ( ddef: DefDef ) ( implicit ctx: Context ) : Tree

Add a Java varargs bridge

[+] override def changesMembers : Boolean

Can this transform create or delete non-private members?

[+] private def elimRepeated ( tp: Type ) ( implicit ctx: Context ) : Type
[+] override def mayChange ( sym: Symbol ) ( implicit ctx: Context ) : Boolean

Denotations with a symbol where mayChange is false are guaranteed to be unaffected by this transform, so transformInfo need not be run. This can save time, and more importantly, can help avoid forcing symbol completers.

[+] private def overridesJava ( sym: Symbol ) ( implicit ctx: Context ) : Boolean
[+] override def phaseName : String

A name given to the Phase that can be used to debug the compiler. For instance, it is possible to print trees after a given phase using:

$ ./bin/dotc -Xprint:<phaseNameHere> sourceFile.scala
[+] private def seqToArray ( tree: Tree , pt: Type ) ( implicit ctx: Context ) : Tree

Convert sequence argument to Java array of type pt

[+] private def toJavaVarArgs ( tp: Type ) ( implicit ctx: Context ) : Type

Convert type from Scala to Java varargs method

[+] override def transform ( ref: SingleDenotation ) ( implicit ctx: Context ) : SingleDenotation

The transformation method

[+] override def transformApply ( tree: Apply ) ( implicit ctx: Context , info: TransformerInfo ) : Tree
[+] override def transformDefDef ( tree: DefDef ) ( implicit ctx: Context , info: TransformerInfo ) : Tree

If method overrides a Java varargs method, add a varargs bridge. Also transform trees inside method annotation

[+] override def transformIdent ( tree: Ident ) ( implicit ctx: Context , info: TransformerInfo ) : Tree
[+] def transformInfo ( tp: Type , sym: Symbol ) ( implicit ctx: Context ) : Type
[+] override def transformSelect ( tree: Select ) ( implicit ctx: Context , info: TransformerInfo ) : Tree
[+] override def transformTypeApply ( tree: TypeApply ) ( implicit ctx: Context , info: TransformerInfo ) : Tree
[+] def transformTypeOfTree ( tree: Tree ) ( implicit ctx: Context ) : Tree