summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugene Burmako <xeno.by@gmail.com>2012-07-17 11:58:56 +0200
committerEugene Burmako <xeno.by@gmail.com>2012-07-17 12:05:08 +0200
commitea47260be5daf873ff30234d23732f7732d56d1b (patch)
tree787330efb79111a9aed898168eea5d0d9cd3b8ad
parent0cfd858a38ddf0ac83d9bbefe85110f88dc707c0 (diff)
downloadscala-ea47260be5daf873ff30234d23732f7732d56d1b.tar.gz
scala-ea47260be5daf873ff30234d23732f7732d56d1b.tar.bz2
scala-ea47260be5daf873ff30234d23732f7732d56d1b.zip
test case closes SI-6047
The bug is not reproducible both in M4 and in M5.
-rw-r--r--test/files/pos/t6047.flags1
-rw-r--r--test/files/pos/t6047.scala20
2 files changed, 21 insertions, 0 deletions
diff --git a/test/files/pos/t6047.flags b/test/files/pos/t6047.flags
new file mode 100644
index 0000000000..cd66464f2f
--- /dev/null
+++ b/test/files/pos/t6047.flags
@@ -0,0 +1 @@
+-language:experimental.macros \ No newline at end of file
diff --git a/test/files/pos/t6047.scala b/test/files/pos/t6047.scala
new file mode 100644
index 0000000000..66b52b285f
--- /dev/null
+++ b/test/files/pos/t6047.scala
@@ -0,0 +1,20 @@
+import scala.reflect.makro.Context
+import java.io.InputStream
+
+object Macros {
+ def unpack[A](input: InputStream): A = macro unpack_impl[A]
+
+ def unpack_impl[A: c.TypeTag](c: Context)(input: c.Expr[InputStream]): c.Expr[A] = {
+ import c.universe._
+
+ def unpackcode(tpe: c.Type): c.Expr[_] = {
+ if (tpe <:< implicitly[c.AbsTypeTag[Traversable[_]]].tpe) {
+
+ }
+ ???
+ }
+
+ unpackcode(c.typeOf[A])
+ ???
+ }
+ } \ No newline at end of file