diff options
Diffstat (limited to 'tests/untried/neg/t6123-explaintypes-macros')
4 files changed, 20 insertions, 0 deletions
diff --git a/tests/untried/neg/t6123-explaintypes-macros/BadMac_2.flags b/tests/untried/neg/t6123-explaintypes-macros/BadMac_2.flags new file mode 100644 index 000000000..b36707c7c --- /dev/null +++ b/tests/untried/neg/t6123-explaintypes-macros/BadMac_2.flags @@ -0,0 +1 @@ +-explaintypes diff --git a/tests/untried/neg/t6123-explaintypes-macros/BadMac_2.scala b/tests/untried/neg/t6123-explaintypes-macros/BadMac_2.scala new file mode 100644 index 000000000..75ded4ef7 --- /dev/null +++ b/tests/untried/neg/t6123-explaintypes-macros/BadMac_2.scala @@ -0,0 +1,8 @@ +import scala.language.experimental.macros +import scala.reflect.macros.blackbox.Context + +// explain some macro types to me +object BadMac { + def printf(format: String, params: Any*): Unit = macro printf_impl + def printf_impl(c: Context)(format: c.Expr[String], params: c.Expr[String]*): c.Expr[Unit] = ??? +} diff --git a/tests/untried/neg/t6123-explaintypes-macros/Macros.flags b/tests/untried/neg/t6123-explaintypes-macros/Macros.flags new file mode 100644 index 000000000..b36707c7c --- /dev/null +++ b/tests/untried/neg/t6123-explaintypes-macros/Macros.flags @@ -0,0 +1 @@ +-explaintypes diff --git a/tests/untried/neg/t6123-explaintypes-macros/Macros.scala b/tests/untried/neg/t6123-explaintypes-macros/Macros.scala new file mode 100644 index 000000000..f2238b39a --- /dev/null +++ b/tests/untried/neg/t6123-explaintypes-macros/Macros.scala @@ -0,0 +1,10 @@ +import scala.language.experimental.macros +import scala.reflect.macros.blackbox.Context + +object Macros { + def printf(format: String, params: Any*): Unit = macro printf_impl + def printf_impl(c: Context)(format: c.Expr[String], params: c.Expr[Any]*): c.Expr[Unit] = ??? +} + +// something trivial to run +object Test extends App |