summaryrefslogtreecommitdiff
path: root/test/files/run/t6259.scala
diff options
context:
space:
mode:
authorJames Iry <jamesiry@gmail.com>2013-02-11 09:22:43 -0800
committerJames Iry <jamesiry@gmail.com>2013-02-11 09:22:43 -0800
commit8a46441d19f61ce3e1e1af2564a756905220aa39 (patch)
treee17d4eab194b45613ca3d5136bad553963a11ca6 /test/files/run/t6259.scala
parentce32c1af462de7d7c6b90efd56217e202a18d1e6 (diff)
parent22d315d61b11e95c3a18e1285ca2131f614e13fb (diff)
downloadscala-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.scala56
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>
+}
+
+