diff options
Diffstat (limited to 'tests/disabled/macro/run/macro-impl-tparam-typetag-is-optional')
-rw-r--r-- | tests/disabled/macro/run/macro-impl-tparam-typetag-is-optional/Impls_1.scala | 9 | ||||
-rw-r--r-- | tests/disabled/macro/run/macro-impl-tparam-typetag-is-optional/Macros_Test_2.scala | 4 |
2 files changed, 13 insertions, 0 deletions
diff --git a/tests/disabled/macro/run/macro-impl-tparam-typetag-is-optional/Impls_1.scala b/tests/disabled/macro/run/macro-impl-tparam-typetag-is-optional/Impls_1.scala new file mode 100644 index 000000000..fc72e7a97 --- /dev/null +++ b/tests/disabled/macro/run/macro-impl-tparam-typetag-is-optional/Impls_1.scala @@ -0,0 +1,9 @@ +import scala.reflect.macros.blackbox.Context + +object Impls { + def foo[U](c: Context) = { + import c.universe._ + val body = Apply(Select(Ident(definitions.PredefModule), TermName("println")), List(Literal(Constant("don't know U")))) + c.Expr[Unit](body) + } +}
\ No newline at end of file diff --git a/tests/disabled/macro/run/macro-impl-tparam-typetag-is-optional/Macros_Test_2.scala b/tests/disabled/macro/run/macro-impl-tparam-typetag-is-optional/Macros_Test_2.scala new file mode 100644 index 000000000..14154ee03 --- /dev/null +++ b/tests/disabled/macro/run/macro-impl-tparam-typetag-is-optional/Macros_Test_2.scala @@ -0,0 +1,4 @@ +object Test extends dotty.runtime.LegacyApp { + def foo[U]: Unit = macro Impls.foo[U] + foo[Int] +}
\ No newline at end of file |