class SeqLiterals
extends MiniPhaseTransform

A transformer that eliminates SeqLiteral's, transforming SeqLiteral(elems) to an operation equivalent to

JavaSeqLiteral(elems).toSeq

Instead of toSeq, which takes an implicit, the appropriate "wrapArray" method is called directly. The reason for this step is that JavaSeqLiterals, being arrays keep a precise type after erasure, whereas SeqLiterals only get the erased type Seq,

Constructors

SeqLiterals ( )

Members

[+] override def checkPostCondition ( tree: Tree ) ( implicit ctx: Context ) : Unit

Check what the phase achieves, to be called at any point after it is finished.

Check what the phase achieves, to be called at any point after it is finished.

[+] 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:

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
[+] override def runsAfter : Set [ Class [ Nothing <: Phase ] ]

List of names of phases that should precede this phase

List of names of phases that should precede this phase

[+] override def transformSeqLiteral ( tree: SeqLiteral ) ( implicit ctx: Context , info: TransformerInfo ) : Tree