diff options
author | James Iry <jamesiry@gmail.com> | 2013-02-11 09:22:43 -0800 |
---|---|---|
committer | James Iry <jamesiry@gmail.com> | 2013-02-11 09:22:43 -0800 |
commit | 8a46441d19f61ce3e1e1af2564a756905220aa39 (patch) | |
tree | e17d4eab194b45613ca3d5136bad553963a11ca6 /test/files/run/t6259.scala | |
parent | ce32c1af462de7d7c6b90efd56217e202a18d1e6 (diff) | |
parent | 22d315d61b11e95c3a18e1285ca2131f614e13fb (diff) | |
download | scala-8a46441d19f61ce3e1e1af2564a756905220aa39.tar.gz scala-8a46441d19f61ce3e1e1af2564a756905220aa39.tar.bz2 scala-8a46441d19f61ce3e1e1af2564a756905220aa39.zip |
Merge pull request #2112 from paulp/pr/merge-210x
merge 2.10.x into master
Diffstat (limited to 'test/files/run/t6259.scala')
-rw-r--r-- | test/files/run/t6259.scala | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/test/files/run/t6259.scala b/test/files/run/t6259.scala new file mode 100644 index 0000000000..294c95e96b --- /dev/null +++ b/test/files/run/t6259.scala @@ -0,0 +1,56 @@ +import scala.reflect.runtime.universe._ + +class A[X](implicit val tt: TypeTag[X]) {} +object B extends A[String] + +object C { + object D extends A[String] +} + +trait E { + object F extends A[String] +} + +class G { + object H extends A[String] +} + +object HasX { + val x = { + object InVal extends A[String] + InVal + 5 + } + +} + +trait NeedsEarly { + val x: AnyRef +} + +object Early extends { + // Drops to this.getClass and is not ok... + val x = { object EarlyOk extends A[String]; EarlyOk } +} with NeedsEarly + + +class DoubleTrouble[X](x: AnyRef)(implicit override val tt: TypeTag[X]) extends A[X] + +object DoubleOk extends DoubleTrouble[String]({ + // Drops to this.getClass and is an issue + object InnerTrouble extends A[String]; + InnerTrouble +}) + +object Test extends App { + B + C.D + val e = new E {}; e.F + val g = new G; g.H + + locally(HasX.x) + // locally(Early.x) TODO sort out VerifyError in Early$.<init> + // DoubleOk TODO sort out VerifyError in DoubleOk$.<init> +} + + |