From 066a800e3935988760dcfca44bef91e5b119c23b Mon Sep 17 00:00:00 2001 From: Eugene Burmako Date: Sat, 9 Jun 2012 11:02:10 +0200 Subject: test case, closes SI-5742 --- test/files/pos/t5742.scala | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 test/files/pos/t5742.scala diff --git a/test/files/pos/t5742.scala b/test/files/pos/t5742.scala new file mode 100644 index 0000000000..3d3125b5d3 --- /dev/null +++ b/test/files/pos/t5742.scala @@ -0,0 +1,8 @@ +import scala.reflect.runtime.universe._ + +object Test extends App { + def foo[T](a: T) = reify { + val x1 = a + val x2 = reify(a) + } +} \ No newline at end of file -- cgit v1.2.3 From fca291e6bbfb5c3e1eb1e0fd5715bf8b8b102804 Mon Sep 17 00:00:00 2001 From: Eugene Burmako Date: Sat, 9 Jun 2012 11:03:27 +0200 Subject: test case, closes SI-5738 --- test/files/pos/t5738.scala | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 test/files/pos/t5738.scala diff --git a/test/files/pos/t5738.scala b/test/files/pos/t5738.scala new file mode 100644 index 0000000000..b8755ed66e --- /dev/null +++ b/test/files/pos/t5738.scala @@ -0,0 +1,8 @@ +import scala.reflect.runtime.universe._ + +object Test extends App { + def f[T](a: T, b: T) = { + reify(a.toString + b) + reify(a + b.toString) + } +} \ No newline at end of file -- cgit v1.2.3 From 51ef16f2e963c27b988e2f1627dc4f6160641b9f Mon Sep 17 00:00:00 2001 From: Eugene Burmako Date: Sat, 9 Jun 2012 11:13:08 +0200 Subject: test case, closes SI-5816 --- test/files/run/t5816.check | 1 + test/files/run/t5816.scala | 17 +++++++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 test/files/run/t5816.check create mode 100644 test/files/run/t5816.scala diff --git a/test/files/run/t5816.check b/test/files/run/t5816.check new file mode 100644 index 0000000000..920b64a50d --- /dev/null +++ b/test/files/run/t5816.check @@ -0,0 +1 @@ +5.+(Test.this.y) diff --git a/test/files/run/t5816.scala b/test/files/run/t5816.scala new file mode 100644 index 0000000000..f0279e5703 --- /dev/null +++ b/test/files/run/t5816.scala @@ -0,0 +1,17 @@ +import scala.reflect.runtime.universe._ +import scala.reflect.runtime.{currentMirror => cm} +import scala.tools.reflect.ToolBox + +object Test extends App { + val toolbox = cm.mkToolBox() + + def printSource[T](expr: Expr[T]) { + val ttree = toolbox typeCheck expr.tree + println(ttree.toString) + } + + var y = 3 + printSource(reify { + 5 + y + }) +} \ No newline at end of file -- cgit v1.2.3 From d2a58a381905d03552378402f54cbcbeafc04f1e Mon Sep 17 00:00:00 2001 From: Eugene Burmako Date: Sat, 9 Jun 2012 11:14:28 +0200 Subject: test case, closes SI-5881 --- test/files/run/t5881.check | 2 ++ test/files/run/t5881.scala | 6 ++++++ 2 files changed, 8 insertions(+) create mode 100644 test/files/run/t5881.check create mode 100644 test/files/run/t5881.scala diff --git a/test/files/run/t5881.check b/test/files/run/t5881.check new file mode 100644 index 0000000000..477fb935a8 --- /dev/null +++ b/test/files/run/t5881.check @@ -0,0 +1,2 @@ +ClassTag[class scala.collection.immutable.List] +ClassTag[class scala.collection.immutable.List] diff --git a/test/files/run/t5881.scala b/test/files/run/t5881.scala new file mode 100644 index 0000000000..01bee29181 --- /dev/null +++ b/test/files/run/t5881.scala @@ -0,0 +1,6 @@ +import scala.reflect.ClassTag + +object Test extends App { + println(implicitly[ClassTag[List[T forSome {type T <: List[T]}]]]) + println(implicitly[ClassTag[List[Any]]]) +} \ No newline at end of file -- cgit v1.2.3 From cbf1547556f6ab865282702218fabed087797c91 Mon Sep 17 00:00:00 2001 From: Eugene Burmako Date: Sat, 9 Jun 2012 11:15:49 +0200 Subject: test case, closes SI-5840 --- test/files/run/t5840.scala | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 test/files/run/t5840.scala diff --git a/test/files/run/t5840.scala b/test/files/run/t5840.scala new file mode 100644 index 0000000000..da036d5122 --- /dev/null +++ b/test/files/run/t5840.scala @@ -0,0 +1,7 @@ +import scala.reflect.runtime.universe._ + +object Test extends App { + reify { + class C[T <: String with Singleton] + } +} \ No newline at end of file -- cgit v1.2.3