diff options
author | Eugene Burmako <xeno.by@gmail.com> | 2012-07-17 11:58:56 +0200 |
---|---|---|
committer | Eugene Burmako <xeno.by@gmail.com> | 2012-07-17 12:05:08 +0200 |
commit | ea47260be5daf873ff30234d23732f7732d56d1b (patch) | |
tree | 787330efb79111a9aed898168eea5d0d9cd3b8ad /test/files/pos | |
parent | 0cfd858a38ddf0ac83d9bbefe85110f88dc707c0 (diff) | |
download | scala-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.
Diffstat (limited to 'test/files/pos')
-rw-r--r-- | test/files/pos/t6047.flags | 1 | ||||
-rw-r--r-- | test/files/pos/t6047.scala | 20 |
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 |