diff options
Diffstat (limited to 'test/files/neg/macro-invalidsig-implicit-params')
-rw-r--r-- | test/files/neg/macro-invalidsig-implicit-params/Impls_Macros_1.scala | 19 | ||||
-rw-r--r-- | test/files/neg/macro-invalidsig-implicit-params/Test_2.scala | 4 |
2 files changed, 0 insertions, 23 deletions
diff --git a/test/files/neg/macro-invalidsig-implicit-params/Impls_Macros_1.scala b/test/files/neg/macro-invalidsig-implicit-params/Impls_Macros_1.scala deleted file mode 100644 index 7a7293422e..0000000000 --- a/test/files/neg/macro-invalidsig-implicit-params/Impls_Macros_1.scala +++ /dev/null @@ -1,19 +0,0 @@ -import scala.reflect.runtime.universe._ -import scala.reflect.macros.{Context => Ctx} - -object Impls { - def foo_targs[T, U: c.WeakTypeTag](c: Ctx)(implicit x: c.Expr[Int]) = { - import c.{prefix => prefix} - import c.universe._ - val body = Block(List( - Apply(Select(Ident(definitions.PredefModule), newTermName("println")), List(Literal(Constant("invoking foo_targs...")))), - Apply(Select(Ident(definitions.PredefModule), newTermName("println")), List(Literal(Constant("type of prefix is: " + prefix.staticType)))), - Apply(Select(Ident(definitions.PredefModule), newTermName("println")), List(Literal(Constant("U is: " + implicitly[c.WeakTypeTag[U]].tpe))))), - Literal(Constant(()))) - c.Expr[Unit](body) - } -} - -class Macros[T] { - def foo_targs[U](x: Int) = macro Impls.foo_targs[T, U] -}
\ No newline at end of file diff --git a/test/files/neg/macro-invalidsig-implicit-params/Test_2.scala b/test/files/neg/macro-invalidsig-implicit-params/Test_2.scala deleted file mode 100644 index 90e850df21..0000000000 --- a/test/files/neg/macro-invalidsig-implicit-params/Test_2.scala +++ /dev/null @@ -1,4 +0,0 @@ -object Test extends App { - println("foo_targs:") - new Macros[Int]().foo_targs[String](42) -}
\ No newline at end of file |