summaryrefslogtreecommitdiff
path: root/test/files/run/constant-type.scala
blob: 373746af4a48066eb18ae14fd2af77eb1ec82c74 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import scala.tools.partest.ReplTest

// see the commit message to understand what this stuff is about
// just a quick note:
// transformedType returns an erased version of the type
// as explained in the commit message, Type.erasure won't do for this test
// because it does some postprocessing to the result of transformedType
object Test extends ReplTest {
  def code = """
:power
val s = transformedType(StringClass.toType).asInstanceOf[Type]
{ println(exitingPhase(currentRun.erasurePhase)(ConstantType(Constant(s)))) }
{ exitingPhase(currentRun.erasurePhase)(println(ConstantType(Constant(s)))) }
{ ConstantType(Constant(s)); println(exitingPhase(currentRun.erasurePhase)(ConstantType(Constant(s)))); }
{ ConstantType(Constant(s)); exitingPhase(currentRun.erasurePhase)(println(ConstantType(Constant(s)))); }
  """
}