diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/files/run/t5271_1.check (renamed from test/pending/run/t5271_1.check) | 0 | ||||
-rw-r--r-- | test/files/run/t5271_1.scala (renamed from test/pending/run/t5271_1.scala) | 0 | ||||
-rw-r--r-- | test/files/run/t5271_2.check (renamed from test/pending/run/t5271_2.check) | 0 | ||||
-rw-r--r-- | test/files/run/t5271_2.scala (renamed from test/pending/run/t5271_2.scala) | 0 | ||||
-rw-r--r-- | test/files/run/t5271_3.check | 1 | ||||
-rw-r--r-- | test/files/run/t5271_3.scala | 17 | ||||
-rw-r--r-- | test/files/run/t5271_4.check | 0 | ||||
-rw-r--r-- | test/files/run/t5271_4.scala | 14 | ||||
-rw-r--r-- | test/files/run/t5273_1.check (renamed from test/pending/run/t5273_2.check) | 0 | ||||
-rw-r--r-- | test/files/run/t5273_1.scala (renamed from test/pending/run/t5273_2.scala) | 0 | ||||
-rw-r--r-- | test/files/run/t5273_2a.check | 1 | ||||
-rw-r--r-- | test/files/run/t5273_2a.scala | 15 | ||||
-rw-r--r-- | test/files/run/t5273_2b.check (renamed from test/pending/run/t5273_1.check) | 0 | ||||
-rw-r--r-- | test/files/run/t5273_2b.scala (renamed from test/pending/run/t5273_1.scala) | 0 | ||||
-rw-r--r-- | test/files/run/t5276_1a.check | 1 | ||||
-rw-r--r-- | test/files/run/t5276_1a.scala (renamed from test/pending/run/t5276.scala) | 2 | ||||
-rw-r--r-- | test/files/run/t5276_1b.check | 1 | ||||
-rw-r--r-- | test/files/run/t5276_1b.scala | 15 | ||||
-rw-r--r-- | test/files/run/t5276_2a.check | 1 | ||||
-rw-r--r-- | test/files/run/t5276_2a.scala | 18 | ||||
-rw-r--r-- | test/files/run/t5276_2b.check | 1 | ||||
-rw-r--r-- | test/files/run/t5276_2b.scala | 19 | ||||
-rw-r--r-- | test/pending/run/t5276.check | 1 |
23 files changed, 105 insertions, 2 deletions
diff --git a/test/pending/run/t5271_1.check b/test/files/run/t5271_1.check index e69de29bb2..e69de29bb2 100644 --- a/test/pending/run/t5271_1.check +++ b/test/files/run/t5271_1.check diff --git a/test/pending/run/t5271_1.scala b/test/files/run/t5271_1.scala index 5f10e64528..5f10e64528 100644 --- a/test/pending/run/t5271_1.scala +++ b/test/files/run/t5271_1.scala diff --git a/test/pending/run/t5271_2.check b/test/files/run/t5271_2.check index b8626c4cff..b8626c4cff 100644 --- a/test/pending/run/t5271_2.check +++ b/test/files/run/t5271_2.check diff --git a/test/pending/run/t5271_2.scala b/test/files/run/t5271_2.scala index 71967c04ed..71967c04ed 100644 --- a/test/pending/run/t5271_2.scala +++ b/test/files/run/t5271_2.scala diff --git a/test/files/run/t5271_3.check b/test/files/run/t5271_3.check new file mode 100644 index 0000000000..f32a5804e2 --- /dev/null +++ b/test/files/run/t5271_3.check @@ -0,0 +1 @@ +true
\ No newline at end of file diff --git a/test/files/run/t5271_3.scala b/test/files/run/t5271_3.scala new file mode 100644 index 0000000000..bfa116c691 --- /dev/null +++ b/test/files/run/t5271_3.scala @@ -0,0 +1,17 @@ +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) + val ttree = toolbox.typeCheck(code.tree) + toolbox.runExpr(ttree) +} diff --git a/test/files/run/t5271_4.check b/test/files/run/t5271_4.check new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/test/files/run/t5271_4.check diff --git a/test/files/run/t5271_4.scala b/test/files/run/t5271_4.scala new file mode 100644 index 0000000000..e5e16033e8 --- /dev/null +++ b/test/files/run/t5271_4.scala @@ -0,0 +1,14 @@ +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 object C + }; + + 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/t5273_2.check b/test/files/run/t5273_1.check index 0cfbf08886..0cfbf08886 100644 --- a/test/pending/run/t5273_2.check +++ b/test/files/run/t5273_1.check diff --git a/test/pending/run/t5273_2.scala b/test/files/run/t5273_1.scala index 1175881c9f..1175881c9f 100644 --- a/test/pending/run/t5273_2.scala +++ b/test/files/run/t5273_1.scala diff --git a/test/files/run/t5273_2a.check b/test/files/run/t5273_2a.check new file mode 100644 index 0000000000..d8263ee986 --- /dev/null +++ b/test/files/run/t5273_2a.check @@ -0,0 +1 @@ +2
\ No newline at end of file diff --git a/test/files/run/t5273_2a.scala b/test/files/run/t5273_2a.scala new file mode 100644 index 0000000000..12ddbb280a --- /dev/null +++ b/test/files/run/t5273_2a.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{ + val foo :: bar :: _ = List(1, 2, 3) + println(foo * bar) + }; + + 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/t5273_1.check b/test/files/run/t5273_2b.check index c551774ca5..c551774ca5 100644 --- a/test/pending/run/t5273_1.check +++ b/test/files/run/t5273_2b.check diff --git a/test/pending/run/t5273_1.scala b/test/files/run/t5273_2b.scala index 8b75084463..8b75084463 100644 --- a/test/pending/run/t5273_1.scala +++ b/test/files/run/t5273_2b.scala diff --git a/test/files/run/t5276_1a.check b/test/files/run/t5276_1a.check new file mode 100644 index 0000000000..d8263ee986 --- /dev/null +++ b/test/files/run/t5276_1a.check @@ -0,0 +1 @@ +2
\ No newline at end of file diff --git a/test/pending/run/t5276.scala b/test/files/run/t5276_1a.scala index 432fdb91e4..c8afbba19e 100644 --- a/test/pending/run/t5276.scala +++ b/test/files/run/t5276_1a.scala @@ -4,7 +4,7 @@ import reflect.runtime.Mirror.ToolBox object Test extends App { val code = scala.reflect.Code.lift{ - lazy x = 2 + lazy val x = 2 println(x) }; diff --git a/test/files/run/t5276_1b.check b/test/files/run/t5276_1b.check new file mode 100644 index 0000000000..d8263ee986 --- /dev/null +++ b/test/files/run/t5276_1b.check @@ -0,0 +1 @@ +2
\ No newline at end of file diff --git a/test/files/run/t5276_1b.scala b/test/files/run/t5276_1b.scala new file mode 100644 index 0000000000..31582201fb --- /dev/null +++ b/test/files/run/t5276_1b.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{ + implicit lazy val x = 2 + implicitly[Int] + }; + + val reporter = new ConsoleReporter(new Settings) + val toolbox = new ToolBox(reporter) + val ttree = toolbox.typeCheck(code.tree) + toolbox.runExpr(ttree) +} diff --git a/test/files/run/t5276_2a.check b/test/files/run/t5276_2a.check new file mode 100644 index 0000000000..d8263ee986 --- /dev/null +++ b/test/files/run/t5276_2a.check @@ -0,0 +1 @@ +2
\ No newline at end of file diff --git a/test/files/run/t5276_2a.scala b/test/files/run/t5276_2a.scala new file mode 100644 index 0000000000..179c14b739 --- /dev/null +++ b/test/files/run/t5276_2a.scala @@ -0,0 +1,18 @@ +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 C { + lazy val x = 2 + } + + println(new C().x) + }; + + val reporter = new ConsoleReporter(new Settings) + val toolbox = new ToolBox(reporter) + val ttree = toolbox.typeCheck(code.tree) + toolbox.runExpr(ttree) +} diff --git a/test/files/run/t5276_2b.check b/test/files/run/t5276_2b.check new file mode 100644 index 0000000000..d8263ee986 --- /dev/null +++ b/test/files/run/t5276_2b.check @@ -0,0 +1 @@ +2
\ No newline at end of file diff --git a/test/files/run/t5276_2b.scala b/test/files/run/t5276_2b.scala new file mode 100644 index 0000000000..6fe2873fef --- /dev/null +++ b/test/files/run/t5276_2b.scala @@ -0,0 +1,19 @@ +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 C { + implicit lazy val x = 2 + def y = implicitly[Int] + } + + println(new C().y) + }; + + 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/t5276.check b/test/pending/run/t5276.check deleted file mode 100644 index 0cfbf08886..0000000000 --- a/test/pending/run/t5276.check +++ /dev/null @@ -1 +0,0 @@ -2 |