summaryrefslogtreecommitdiff
path: root/test/files
diff options
context:
space:
mode:
authorAdriaan Moors <adriaan.moors@epfl.ch>2012-07-19 10:31:54 -0700
committerAdriaan Moors <adriaan.moors@epfl.ch>2012-07-19 10:31:54 -0700
commita723461cb21ac11dca99e9393a6ed03589ab8525 (patch)
tree3173cd89f3a6f3c643108d3715786ca0a4bf5c9e /test/files
parent1f8a1f1be190c8ad584da523d19e0baebf295451 (diff)
parentea47260be5daf873ff30234d23732f7732d56d1b (diff)
downloadscala-a723461cb21ac11dca99e9393a6ed03589ab8525.tar.gz
scala-a723461cb21ac11dca99e9393a6ed03589ab8525.tar.bz2
scala-a723461cb21ac11dca99e9393a6ed03589ab8525.zip
Merge pull request #923 from scalamacros/ticket/6047
test case closes SI-6047
Diffstat (limited to 'test/files')
-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