summaryrefslogtreecommitdiff
path: root/test/pending/run
diff options
context:
space:
mode:
authorEugene Burmako <xeno.by@gmail.com>2012-02-14 21:59:43 +0100
committerEugene Burmako <xeno.by@gmail.com>2012-02-14 23:08:38 +0100
commit97ec16850b152e6e03aba351cc918c66583362f3 (patch)
tree76be253e22192e9b093c4bb2dbaff6db7bb9ecce /test/pending/run
parentf6174691647bb1fae7e86d53790b1e540b890755 (diff)
downloadscala-97ec16850b152e6e03aba351cc918c66583362f3.tar.gz
scala-97ec16850b152e6e03aba351cc918c66583362f3.tar.bz2
scala-97ec16850b152e6e03aba351cc918c66583362f3.zip
Disables typechecking that precedes reflective compilation
Previously toolboxes used to typecheck their inputs before compiling. Actually, the initial demo by Martin first typechecked the reified tree, then ran it, which typechecked it again, and only then launched the reflective compiler. However, as observed in https://issues.scala-lang.org/browse/SI-5464 current implementation of typechecking is not always idempotent. That's why we cannot allow inputs of toolboxes to be typechecked, at least not until the aforementioned issue is closed. This is not only a convention but also a check inside compileExpr.
Diffstat (limited to 'test/pending/run')
-rw-r--r--test/pending/run/reify_addressbook.scala3
-rw-r--r--test/pending/run/reify_brainf_ck.scala3
-rw-r--r--test/pending/run/reify_callccinterpreter.scala3
-rw-r--r--test/pending/run/reify_classfileann_b.scala8
-rw-r--r--test/pending/run/reify_closure2b.scala3
-rw-r--r--test/pending/run/reify_closure3b.scala3
-rw-r--r--test/pending/run/reify_closure4b.scala3
-rw-r--r--test/pending/run/reify_closure5b.scala3
-rw-r--r--test/pending/run/reify_closure8b.scala3
-rw-r--r--test/pending/run/reify_closure9a.scala3
-rw-r--r--test/pending/run/reify_closure9b.scala3
-rw-r--r--test/pending/run/reify_closures11.scala3
-rw-r--r--test/pending/run/reify_csv.scala3
-rw-r--r--test/pending/run/reify_fors.check5
-rw-r--r--test/pending/run/reify_fors.scala107
-rw-r--r--test/pending/run/reify_gadts.scala3
-rw-r--r--test/pending/run/reify_lazyevaluation.scala3
-rw-r--r--test/pending/run/reify_maps.check4
-rw-r--r--test/pending/run/reify_maps.scala26
-rw-r--r--test/pending/run/reify_properties.scala3
-rw-r--r--test/pending/run/reify_simpleinterpreter.scala3
-rw-r--r--test/pending/run/reify_timeofday.check1
-rw-r--r--test/pending/run/reify_timeofday.scala48
-rw-r--r--test/pending/run/t5258b.scala3
-rw-r--r--test/pending/run/t5258c.scala3
-rw-r--r--test/pending/run/t5271_1.check0
-rw-r--r--test/pending/run/t5271_1.scala13
-rw-r--r--test/pending/run/t5271_2.check1
-rw-r--r--test/pending/run/t5271_2.scala15
-rw-r--r--test/pending/run/t5271_3.check1
-rw-r--r--test/pending/run/t5271_3.scala16
-rw-r--r--test/pending/run/t5418.scala3
32 files changed, 67 insertions, 235 deletions
diff --git a/test/pending/run/reify_addressbook.scala b/test/pending/run/reify_addressbook.scala
index 225f26b75e..54dd5545bd 100644
--- a/test/pending/run/reify_addressbook.scala
+++ b/test/pending/run/reify_addressbook.scala
@@ -66,6 +66,5 @@ object Test extends App {
val reporter = new ConsoleReporter(new Settings)
val toolbox = new ToolBox(reporter)
- val ttree = toolbox.typeCheck(code.tree)
- toolbox.runExpr(ttree)
+ toolbox.runExpr(code.tree)
}
diff --git a/test/pending/run/reify_brainf_ck.scala b/test/pending/run/reify_brainf_ck.scala
index 3bfb76c9ea..0034644b81 100644
--- a/test/pending/run/reify_brainf_ck.scala
+++ b/test/pending/run/reify_brainf_ck.scala
@@ -80,6 +80,5 @@ object Test extends App {
val reporter = new ConsoleReporter(new Settings)
val toolbox = new ToolBox(reporter)
- val ttree = toolbox.typeCheck(code.tree)
- toolbox.runExpr(ttree)
+ toolbox.runExpr(code.tree)
}
diff --git a/test/pending/run/reify_callccinterpreter.scala b/test/pending/run/reify_callccinterpreter.scala
index c10f4f0b4e..96ae9c5c17 100644
--- a/test/pending/run/reify_callccinterpreter.scala
+++ b/test/pending/run/reify_callccinterpreter.scala
@@ -89,6 +89,5 @@ object Test extends App {
val reporter = new ConsoleReporter(new Settings)
val toolbox = new ToolBox(reporter)
- val ttree = toolbox.typeCheck(code.tree)
- toolbox.runExpr(ttree)
+ toolbox.runExpr(code.tree)
}
diff --git a/test/pending/run/reify_classfileann_b.scala b/test/pending/run/reify_classfileann_b.scala
index b76dd8fc9f..c31826377a 100644
--- a/test/pending/run/reify_classfileann_b.scala
+++ b/test/pending/run/reify_classfileann_b.scala
@@ -17,12 +17,8 @@ object Test extends App {
}.tree
println(tree.toString)
- // test 2: import and typecheck
+ // test 2: import and compile
val reporter = new ConsoleReporter(new Settings)
val toolbox = new ToolBox(reporter)
- val ttree = toolbox.typeCheck(tree)
- println(ttree.toString)
-
- // test 3: import and compile
- toolbox.runExpr(ttree)
+ toolbox.runExpr(tree)
} \ No newline at end of file
diff --git a/test/pending/run/reify_closure2b.scala b/test/pending/run/reify_closure2b.scala
index a1fead07ae..b9c0063290 100644
--- a/test/pending/run/reify_closure2b.scala
+++ b/test/pending/run/reify_closure2b.scala
@@ -12,8 +12,7 @@ object Test extends App {
val reporter = new ConsoleReporter(new Settings)
val toolbox = new ToolBox(reporter)
- val ttree = toolbox.typeCheck(new Foo(y).fun.tree)
- val dyn = toolbox.runExpr(ttree)
+ val dyn = toolbox.runExpr(new Foo(y).fun.tree)
dyn.asInstanceOf[Int => Int]
}
diff --git a/test/pending/run/reify_closure3b.scala b/test/pending/run/reify_closure3b.scala
index acf07c4749..8f161dbff3 100644
--- a/test/pending/run/reify_closure3b.scala
+++ b/test/pending/run/reify_closure3b.scala
@@ -14,8 +14,7 @@ object Test extends App {
val reporter = new ConsoleReporter(new Settings)
val toolbox = new ToolBox(reporter)
- val ttree = toolbox.typeCheck(new Foo(y).fun.tree)
- val dyn = toolbox.runExpr(ttree)
+ val dyn = toolbox.runExpr(new Foo(y).fun.tree)
dyn.asInstanceOf[Int => Int]
}
diff --git a/test/pending/run/reify_closure4b.scala b/test/pending/run/reify_closure4b.scala
index ed102298c5..238795d4dd 100644
--- a/test/pending/run/reify_closure4b.scala
+++ b/test/pending/run/reify_closure4b.scala
@@ -14,8 +14,7 @@ object Test extends App {
val reporter = new ConsoleReporter(new Settings)
val toolbox = new ToolBox(reporter)
- val ttree = toolbox.typeCheck(new Foo(y).fun.tree)
- val dyn = toolbox.runExpr(ttree)
+ val dyn = toolbox.runExpr(new Foo(y).fun.tree)
dyn.asInstanceOf[Int => Int]
}
diff --git a/test/pending/run/reify_closure5b.scala b/test/pending/run/reify_closure5b.scala
index 29e911538f..bdb2583e8a 100644
--- a/test/pending/run/reify_closure5b.scala
+++ b/test/pending/run/reify_closure5b.scala
@@ -12,8 +12,7 @@ object Test extends App {
val reporter = new ConsoleReporter(new Settings)
val toolbox = new ToolBox(reporter)
- val ttree = toolbox.typeCheck(new Foo(ys).fun.tree)
- val dyn = toolbox.runExpr(ttree)
+ val dyn = toolbox.runExpr(new Foo(ys).fun.tree)
dyn.asInstanceOf[Int => Int]
}
diff --git a/test/pending/run/reify_closure8b.scala b/test/pending/run/reify_closure8b.scala
index 9e37e4e09a..38031c217b 100644
--- a/test/pending/run/reify_closure8b.scala
+++ b/test/pending/run/reify_closure8b.scala
@@ -10,8 +10,7 @@ object Test extends App {
val reporter = new ConsoleReporter(new Settings)
val toolbox = new ToolBox(reporter)
- val ttree = toolbox.typeCheck(new Foo(10).fun.tree)
- val dyn = toolbox.runExpr(ttree)
+ val dyn = toolbox.runExpr(new Foo(10).fun.tree)
val foo = dyn.asInstanceOf[Int]
println(foo)
}
diff --git a/test/pending/run/reify_closure9a.scala b/test/pending/run/reify_closure9a.scala
index f3ee153d3c..185f4ffca1 100644
--- a/test/pending/run/reify_closure9a.scala
+++ b/test/pending/run/reify_closure9a.scala
@@ -11,8 +11,7 @@ object Test extends App {
val reporter = new ConsoleReporter(new Settings)
val toolbox = new ToolBox(reporter)
- val ttree = toolbox.typeCheck(new Foo(y).fun.tree)
- val dyn = toolbox.runExpr(ttree)
+ val dyn = toolbox.runExpr(new Foo(y).fun.tree)
dyn.asInstanceOf[Int]
}
diff --git a/test/pending/run/reify_closure9b.scala b/test/pending/run/reify_closure9b.scala
index 8d349e8701..ad279fac6d 100644
--- a/test/pending/run/reify_closure9b.scala
+++ b/test/pending/run/reify_closure9b.scala
@@ -11,8 +11,7 @@ object Test extends App {
val reporter = new ConsoleReporter(new Settings)
val toolbox = new ToolBox(reporter)
- val ttree = toolbox.typeCheck(new Foo(y).fun.tree)
- val dyn = toolbox.runExpr(ttree)
+ val dyn = toolbox.runExpr(new Foo(y).fun.tree)
dyn.asInstanceOf[Int]
}
diff --git a/test/pending/run/reify_closures11.scala b/test/pending/run/reify_closures11.scala
index 42053bd029..2c4177b8f2 100644
--- a/test/pending/run/reify_closures11.scala
+++ b/test/pending/run/reify_closures11.scala
@@ -11,8 +11,7 @@ object Test extends App {
val reporter = new ConsoleReporter(new Settings)
val toolbox = new ToolBox(reporter)
- val ttree = toolbox.typeCheck(fun().tree)
- val dyn = toolbox.runExpr(ttree)
+ val dyn = toolbox.runExpr(fun().tree)
val foo = dyn.asInstanceOf[Int]
println(foo)
}
diff --git a/test/pending/run/reify_csv.scala b/test/pending/run/reify_csv.scala
index a05a3b55d4..a6a616fab0 100644
--- a/test/pending/run/reify_csv.scala
+++ b/test/pending/run/reify_csv.scala
@@ -37,6 +37,5 @@ object Test extends App {
val reporter = new ConsoleReporter(new Settings)
val toolbox = new ToolBox(reporter)
- val ttree = toolbox.typeCheck(code.tree)
- toolbox.runExpr(ttree)
+ toolbox.runExpr(code.tree)
}
diff --git a/test/pending/run/reify_fors.check b/test/pending/run/reify_fors.check
deleted file mode 100644
index eefddedc20..0000000000
--- a/test/pending/run/reify_fors.check
+++ /dev/null
@@ -1,5 +0,0 @@
-Persons over 20: John Richard
-divisors(34) = List(1, 2, 17, 34)
-findNums(15) = (4,1) (5,2) (6,1) (7,4) (8,3) (8,5) (9,2) (9,4) (10,1) (10,3) (10,7) (11,2) (11,6) (11,8) (12,1) (12,5) (12,7) (13,4) (13,6) (13,10) (14,3) (14,5) (14,9)
-average(List(3.5, 5.0, 4.5)) = 4.333333333333333
-scalProd(List(3.5, 5.0, 4.5), List(2.0, 1.0, 3.0)) = 25.5
diff --git a/test/pending/run/reify_fors.scala b/test/pending/run/reify_fors.scala
deleted file mode 100644
index f3556514a9..0000000000
--- a/test/pending/run/reify_fors.scala
+++ /dev/null
@@ -1,107 +0,0 @@
-import scala.tools.nsc.reporters._
-import scala.tools.nsc.Settings
-import reflect.runtime.Mirror.ToolBox
-
-object Test extends App {
- val code = scala.reflect.Code.lift{
- object Persons {
- /** A list of persons. To create a list, we use Predef.List
- * which takes a variable number of arguments and constructs
- * a list out of them.
- */
- val persons = List(
- new Person("Bob", 17),
- new Person("John", 40),
- new Person("Richard", 68)
- )
-
- /** A Person class. 'val' constructor parameters become
- * public members of the class.
- */
- class Person(val name: String, val age: Int)
-
- /** Return an iterator over persons that are older than 20.
- */
- def olderThan20(xs: Seq[Person]): Iterator[String] =
- olderThan20(xs.elements)
-
- /** Return an iterator over persons older than 20, given
- * an iterator over persons.
- */
- def olderThan20(xs: Iterator[Person]): Iterator[String] = {
-
- // The first expression is called a 'generator' and makes
- // 'p' take values from 'xs'. The second expression is
- // called a 'filter' and it is a boolean expression which
- // selects only persons older than 20. There can be more than
- // one generator and filter. The 'yield' expression is evaluated
- // for each 'p' which satisfies the filters and used to assemble
- // the resulting iterator
- for (p <- xs if p.age > 20) yield p.name
- }
- }
-
- /** Some functions over lists of numbers which demonstrate
- * the use of for comprehensions.
- */
- object Numeric {
-
- /** Return the divisors of n. */
- def divisors(n: Int): List[Int] =
- for (i <- List.range(1, n+1) if n % i == 0) yield i
-
- /** Is 'n' a prime number? */
- def isPrime(n: Int) = divisors(n).length == 2
-
- /** Return pairs of numbers whose sum is prime. */
- def findNums(n: Int): Iterable[(Int, Int)] = {
-
- // a for comprehension using two generators
- for (i <- 1 until n;
- j <- 1 until (i-1);
- if isPrime(i + j)) yield (i, j)
- }
-
- /** Return the sum of the elements of 'xs'. */
- def sum(xs: List[Double]): Double =
- xs.foldLeft(0.0) { (x, y) => x + y }
-
- /** Return the sum of pairwise product of the two lists. */
- def scalProd(xs: List[Double], ys: List[Double]) =
- sum(for((x, y) <- xs zip ys) yield x * y);
-
- /** Remove duplicate elements in 'xs'. */
- def removeDuplicates[A](xs: List[A]): List[A] =
- if (xs.isEmpty)
- xs
- else
- xs.head :: removeDuplicates(for (x <- xs.tail if x != xs.head) yield x)
- }
-
- // import all members of object 'persons' in the current scope
- import Persons._
-
- print("Persons over 20:")
- olderThan20(persons) foreach { x => print(" " + x) }
- println
-
- import Numeric._
-
- println("divisors(34) = " + divisors(34))
-
- print("findNums(15) =")
- findNums(15) foreach { x => print(" " + x) }
- println
-
- val xs = List(3.5, 5.0, 4.5)
- println("average(" + xs + ") = " + sum(xs) / xs.length)
-
- val ys = List(2.0, 1.0, 3.0)
- println("scalProd(" + xs + ", " + ys +") = " + scalProd(xs, ys))
- };
-
- val reporter = new ConsoleReporter(new Settings)
- val toolbox = new ToolBox(reporter)
- val ttree = toolbox.typeCheck(code.tree)
- toolbox.runExpr(ttree)
-}
diff --git a/test/pending/run/reify_gadts.scala b/test/pending/run/reify_gadts.scala
index 7077de735c..9feb7a5726 100644
--- a/test/pending/run/reify_gadts.scala
+++ b/test/pending/run/reify_gadts.scala
@@ -40,6 +40,5 @@ object Test extends App {
val reporter = new ConsoleReporter(new Settings)
val toolbox = new ToolBox(reporter)
- val ttree = toolbox.typeCheck(code.tree)
- toolbox.runExpr(ttree)
+ toolbox.runExpr(code.tree)
}
diff --git a/test/pending/run/reify_lazyevaluation.scala b/test/pending/run/reify_lazyevaluation.scala
index f38af76751..0720a7c979 100644
--- a/test/pending/run/reify_lazyevaluation.scala
+++ b/test/pending/run/reify_lazyevaluation.scala
@@ -60,6 +60,5 @@ object Test extends App {
val reporter = new ConsoleReporter(new Settings)
val toolbox = new ToolBox(reporter)
- val ttree = toolbox.typeCheck(code.tree)
- toolbox.runExpr(ttree)
+ toolbox.runExpr(code.tree)
}
diff --git a/test/pending/run/reify_maps.check b/test/pending/run/reify_maps.check
deleted file mode 100644
index 08cbbb1359..0000000000
--- a/test/pending/run/reify_maps.check
+++ /dev/null
@@ -1,4 +0,0 @@
-red has code: 16711680
-Unknown color: green
-Unknown color: blue
-turquoise has code: 65535
diff --git a/test/pending/run/reify_maps.scala b/test/pending/run/reify_maps.scala
deleted file mode 100644
index 589b28d049..0000000000
--- a/test/pending/run/reify_maps.scala
+++ /dev/null
@@ -1,26 +0,0 @@
-import scala.tools.nsc.reporters._
-import scala.tools.nsc.Settings
-import reflect.runtime.Mirror.ToolBox
-
-object Test extends App {
- val code = scala.reflect.Code.lift{
- val colors = Map("red" -> 0xFF0000,
- "turquoise" -> 0x00FFFF,
- "black" -> 0x000000,
- "orange" -> 0xFF8040,
- "brown" -> 0x804000)
- for (name <- List("red", "green", "blue", "turquoise")) println(
- colors.get(name) match {
- case Some(code) =>
- name + " has code: " + code
- case None =>
- "Unknown color: " + name
- }
- )
- };
-
- val reporter = new ConsoleReporter(new Settings)
- val toolbox = new ToolBox(reporter)
- val ttree = toolbox.typeCheck(code.tree)
- toolbox.runExpr(ttree)
-}
diff --git a/test/pending/run/reify_properties.scala b/test/pending/run/reify_properties.scala
index 2115a96715..265c344b8e 100644
--- a/test/pending/run/reify_properties.scala
+++ b/test/pending/run/reify_properties.scala
@@ -58,6 +58,5 @@ object Test extends App {
val reporter = new ConsoleReporter(new Settings)
val toolbox = new ToolBox(reporter)
- val ttree = toolbox.typeCheck(code.tree)
- toolbox.runExpr(ttree)
+ toolbox.runExpr(code.tree)
}
diff --git a/test/pending/run/reify_simpleinterpreter.scala b/test/pending/run/reify_simpleinterpreter.scala
index b39f5583bb..4762afb3cc 100644
--- a/test/pending/run/reify_simpleinterpreter.scala
+++ b/test/pending/run/reify_simpleinterpreter.scala
@@ -77,6 +77,5 @@ object Test extends App {
val reporter = new ConsoleReporter(new Settings)
val toolbox = new ToolBox(reporter)
- val ttree = toolbox.typeCheck(code.tree)
- toolbox.runExpr(ttree)
+ toolbox.runExpr(code.tree)
}
diff --git a/test/pending/run/reify_timeofday.check b/test/pending/run/reify_timeofday.check
deleted file mode 100644
index 3fd3b76a62..0000000000
--- a/test/pending/run/reify_timeofday.check
+++ /dev/null
@@ -1 +0,0 @@
-DateError
diff --git a/test/pending/run/reify_timeofday.scala b/test/pending/run/reify_timeofday.scala
deleted file mode 100644
index 6bd11b0d30..0000000000
--- a/test/pending/run/reify_timeofday.scala
+++ /dev/null
@@ -1,48 +0,0 @@
-import scala.tools.nsc.reporters._
-import scala.tools.nsc.Settings
-import reflect.runtime.Mirror.ToolBox
-
-object Test extends App {
- val code = scala.reflect.Code.lift{
- class DateError extends Exception
-
- /** Simulating properties in Scala
- * (example 4.2.1 in ScalaReference.pdf)
- */
- class TimeOfDayVar {
- private var h, m, s: Int = 0
-
- def hours = h
-
- /** A method 'ident_=' is a setter for 'ident'. 'code.ident = ...' will
- * be translated to a call to 'ident_='
- */
- def hours_= (h: Int) =
- if (0 <= h && h < 24) this.h = h
- else throw new DateError()
-
- def minutes = m
- def minutes_= (m: Int) =
- if (0 <= m && m < 60) this.m = m
- else throw new DateError()
-
- def seconds = s
- def seconds_= (s: Int) =
- if (0 <= s && s < 60) this.s = s
- else throw new DateError()
- }
-
- val d = new TimeOfDayVar
- d.hours = 8; d.minutes = 30; d.seconds = 0
- try { d.hours = 25 // throws a DateError exception
- } catch {
- case de: DateError => println("DateError")
- case e: Exception => println("Exception")
- }
- };
-
- val reporter = new ConsoleReporter(new Settings)
- val toolbox = new ToolBox(reporter)
- val ttree = toolbox.typeCheck(code.tree)
- toolbox.runExpr(ttree)
-}
diff --git a/test/pending/run/t5258b.scala b/test/pending/run/t5258b.scala
index 70cb4a7f4e..3a603095b3 100644
--- a/test/pending/run/t5258b.scala
+++ b/test/pending/run/t5258b.scala
@@ -10,6 +10,5 @@ object Test extends App {
val reporter = new ConsoleReporter(new Settings)
val toolbox = new ToolBox(reporter)
- val ttree = toolbox.typeCheck(code.tree)
- toolbox.runExpr(ttree)
+ toolbox.runExpr(code.tree)
} \ No newline at end of file
diff --git a/test/pending/run/t5258c.scala b/test/pending/run/t5258c.scala
index a93170d0d6..b0d16ba0b1 100644
--- a/test/pending/run/t5258c.scala
+++ b/test/pending/run/t5258c.scala
@@ -10,6 +10,5 @@ object Test extends App {
val reporter = new ConsoleReporter(new Settings)
val toolbox = new ToolBox(reporter)
- val ttree = toolbox.typeCheck(code.tree)
- toolbox.runExpr(ttree)
+ toolbox.runExpr(code.tree)
} \ No newline at end of file
diff --git a/test/pending/run/t5271_1.check b/test/pending/run/t5271_1.check
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/test/pending/run/t5271_1.check
diff --git a/test/pending/run/t5271_1.scala b/test/pending/run/t5271_1.scala
new file mode 100644
index 0000000000..afbd8fe465
--- /dev/null
+++ b/test/pending/run/t5271_1.scala
@@ -0,0 +1,13 @@
+import scala.tools.nsc.reporters._
+import scala.tools.nsc.Settings
+import reflect.runtime.Mirror.ToolBox
+
+object Test extends App {
+ val code = scala.reflect.Code.lift{
+ case class C(foo: Int, bar: Int)
+ };
+
+ val reporter = new ConsoleReporter(new Settings)
+ val toolbox = new ToolBox(reporter)
+ toolbox.runExpr(code.tree)
+}
diff --git a/test/pending/run/t5271_2.check b/test/pending/run/t5271_2.check
new file mode 100644
index 0000000000..b8626c4cff
--- /dev/null
+++ b/test/pending/run/t5271_2.check
@@ -0,0 +1 @@
+4
diff --git a/test/pending/run/t5271_2.scala b/test/pending/run/t5271_2.scala
new file mode 100644
index 0000000000..d85d945973
--- /dev/null
+++ b/test/pending/run/t5271_2.scala
@@ -0,0 +1,15 @@
+import scala.tools.nsc.reporters._
+import scala.tools.nsc.Settings
+import reflect.runtime.Mirror.ToolBox
+
+object Test extends App {
+ val code = scala.reflect.Code.lift{
+ case class C(foo: Int, bar: Int)
+ val c = C(2, 2)
+ println(c.foo * c.bar)
+ };
+
+ val reporter = new ConsoleReporter(new Settings)
+ val toolbox = new ToolBox(reporter)
+ toolbox.runExpr(code.tree)
+}
diff --git a/test/pending/run/t5271_3.check b/test/pending/run/t5271_3.check
new file mode 100644
index 0000000000..f32a5804e2
--- /dev/null
+++ b/test/pending/run/t5271_3.check
@@ -0,0 +1 @@
+true \ No newline at end of file
diff --git a/test/pending/run/t5271_3.scala b/test/pending/run/t5271_3.scala
new file mode 100644
index 0000000000..5a624de903
--- /dev/null
+++ b/test/pending/run/t5271_3.scala
@@ -0,0 +1,16 @@
+import scala.tools.nsc.reporters._
+import scala.tools.nsc.Settings
+import reflect.runtime.Mirror.ToolBox
+
+object Test extends App {
+ val code = scala.reflect.Code.lift{
+ object C { def qwe = 4 }
+ case class C(foo: Int, bar: Int)
+ val c = C(2, 2)
+ println(c.foo * c.bar == C.qwe)
+ };
+
+ val reporter = new ConsoleReporter(new Settings)
+ val toolbox = new ToolBox(reporter)
+ toolbox.runExpr(code.tree)
+}
diff --git a/test/pending/run/t5418.scala b/test/pending/run/t5418.scala
index 065710f15e..fe813cf5ae 100644
--- a/test/pending/run/t5418.scala
+++ b/test/pending/run/t5418.scala
@@ -9,6 +9,5 @@ object Test extends App {
val reporter = new ConsoleReporter(new Settings)
val toolbox = new ToolBox(reporter)
- val ttree = toolbox.typeCheck(code.tree)
- toolbox.runExpr(ttree)
+ toolbox.runExpr(code.tree)
} \ No newline at end of file