diff options
author | Adriaan Moors <adriaan.moors@typesafe.com> | 2013-03-12 16:47:58 -0700 |
---|---|---|
committer | Adriaan Moors <adriaan.moors@typesafe.com> | 2013-03-12 17:18:19 -0700 |
commit | 5f324591a4c4af53f27a64932b843ba1423c37cd (patch) | |
tree | 235c718063583c8d4001e1216eccd533da20bda9 /test/files/run | |
parent | 86b0231d7c4970cfff775ef6511a822d149e755c (diff) | |
parent | 52adf130409df57fd612a119e352345cf1c93979 (diff) | |
download | scala-5f324591a4c4af53f27a64932b843ba1423c37cd.tar.gz scala-5f324591a4c4af53f27a64932b843ba1423c37cd.tar.bz2 scala-5f324591a4c4af53f27a64932b843ba1423c37cd.zip |
Merge 2.10.x into master
Conflicts:
src/compiler/scala/reflect/reify/Errors.scala
src/compiler/scala/tools/nsc/typechecker/NamesDefaults.scala
Diffstat (limited to 'test/files/run')
-rw-r--r-- | test/files/run/t5710-1.check | 1 | ||||
-rw-r--r-- | test/files/run/t5710-1.scala | 15 | ||||
-rw-r--r-- | test/files/run/t5710-2.check | 1 | ||||
-rw-r--r-- | test/files/run/t5710-2.scala | 15 | ||||
-rw-r--r-- | test/files/run/t7235.check | 4 | ||||
-rw-r--r-- | test/files/run/t7235.scala | 14 |
6 files changed, 50 insertions, 0 deletions
diff --git a/test/files/run/t5710-1.check b/test/files/run/t5710-1.check new file mode 100644 index 0000000000..eac2025aeb --- /dev/null +++ b/test/files/run/t5710-1.check @@ -0,0 +1 @@ +evaluated = (abc,abc) diff --git a/test/files/run/t5710-1.scala b/test/files/run/t5710-1.scala new file mode 100644 index 0000000000..12bd858e06 --- /dev/null +++ b/test/files/run/t5710-1.scala @@ -0,0 +1,15 @@ +import scala.reflect.runtime.universe._ +import scala.reflect.runtime.{universe => ru} +import scala.reflect.runtime.{currentMirror => cm} +import scala.tools.reflect.ToolBox + +object Test extends App { + val code = reify { + val (x, y) = ("abc": Any) match { case x => (x, x) } + (x, y) + }; + + val toolbox = cm.mkToolBox() + val evaluated = toolbox.eval(code.tree) + println("evaluated = " + evaluated) +}
\ No newline at end of file diff --git a/test/files/run/t5710-2.check b/test/files/run/t5710-2.check new file mode 100644 index 0000000000..eac2025aeb --- /dev/null +++ b/test/files/run/t5710-2.check @@ -0,0 +1 @@ +evaluated = (abc,abc) diff --git a/test/files/run/t5710-2.scala b/test/files/run/t5710-2.scala new file mode 100644 index 0000000000..6d2129cca2 --- /dev/null +++ b/test/files/run/t5710-2.scala @@ -0,0 +1,15 @@ +import scala.reflect.runtime.universe._ +import scala.reflect.runtime.{universe => ru} +import scala.reflect.runtime.{currentMirror => cm} +import scala.tools.reflect.ToolBox + +object Test extends App { + val code = reify { + val (x, y) = "abc" match { case x => (x, x) } + (x, y) + }; + + val toolbox = cm.mkToolBox() + val evaluated = toolbox.eval(code.tree) + println("evaluated = " + evaluated) +}
\ No newline at end of file diff --git a/test/files/run/t7235.check b/test/files/run/t7235.check new file mode 100644 index 0000000000..9cb9c55a0c --- /dev/null +++ b/test/files/run/t7235.check @@ -0,0 +1,4 @@ +C +List(C) +private val _ = _ +List() diff --git a/test/files/run/t7235.scala b/test/files/run/t7235.scala new file mode 100644 index 0000000000..6039189716 --- /dev/null +++ b/test/files/run/t7235.scala @@ -0,0 +1,14 @@ +import scala.reflect.runtime.universe._ +import scala.reflect.runtime.{universe => ru} +import scala.reflect.runtime.{currentMirror => cm} +import scala.tools.reflect.ToolBox + +class C + +object Test extends App { + val Block(List(ValDef(_, _, tpt: CompoundTypeTree, _)), _) = reify{ val x: C{} = ??? }.tree + println(tpt) + println(tpt.templ.parents) + println(tpt.templ.self) + println(tpt.templ.body) +} |