From f742aa396b3720329bbeff1a23e50820c2ef06f2 Mon Sep 17 00:00:00 2001 From: Eugene Burmako Date: Sat, 9 Mar 2013 13:56:03 +0100 Subject: SI-5710 has fixed itself My job here is only to submit tests. --- test/files/run/t5710-1.check | 1 + test/files/run/t5710-1.scala | 15 +++++++++++++++ test/files/run/t5710-2.check | 1 + test/files/run/t5710-2.scala | 15 +++++++++++++++ 4 files changed, 32 insertions(+) create mode 100644 test/files/run/t5710-1.check create mode 100644 test/files/run/t5710-1.scala create mode 100644 test/files/run/t5710-2.check create mode 100644 test/files/run/t5710-2.scala (limited to 'test/files/run') 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 -- cgit v1.2.3