diff options
author | Josh Suereth <joshua.suereth@gmail.com> | 2012-09-27 13:18:45 -0400 |
---|---|---|
committer | Josh Suereth <joshua.suereth@gmail.com> | 2012-09-27 13:18:45 -0400 |
commit | 6d39c9529d1018801a4fda95466bf8720416abad (patch) | |
tree | 6880f41a6368a6e130ee7ab428ae87698ce4930e /test/pending/run | |
parent | 6ec0fe522256e48f8ccc0204d7c4ed63a34d9ede (diff) | |
parent | 709bb01175c512d124da9874dcaea50022374715 (diff) | |
download | scala-6d39c9529d1018801a4fda95466bf8720416abad.tar.gz scala-6d39c9529d1018801a4fda95466bf8720416abad.tar.bz2 scala-6d39c9529d1018801a4fda95466bf8720416abad.zip |
Merge 2.10.x into master to fix breaking tests and keep things up-to-date.
Diffstat (limited to 'test/pending/run')
-rw-r--r-- | test/pending/run/reflection-mem-eval.scala | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/test/pending/run/reflection-mem-eval.scala b/test/pending/run/reflection-mem-eval.scala new file mode 100644 index 0000000000..9045c44cd6 --- /dev/null +++ b/test/pending/run/reflection-mem-eval.scala @@ -0,0 +1,26 @@ +import scala.tools.partest.MemoryTest + +trait A { type T <: A } +trait B { type T <: B } + +object Test extends MemoryTest { + lazy val tb = { + import scala.reflect.runtime.universe._ + import scala.reflect.runtime.{currentMirror => cm} + import scala.tools.reflect.ToolBox + cm.mkToolBox() + } + + override def maxDelta = 10 + override def calcsPerIter = 3 + override def calc() { + var snippet = """ + trait A { type T <: A } + trait B { type T <: B } + def foo[T](x: List[T]) = x + foo(List(new A {}, new B {})) + """.trim + snippet = snippet + "\n" + (List.fill(50)(snippet.split("\n").last) mkString "\n") + tb.eval(tb.parse(snippet)) + } +}
\ No newline at end of file |