diff options
Diffstat (limited to 'tests/disabled/macro/run/macro-impl-default-params')
-rw-r--r-- | tests/disabled/macro/run/macro-impl-default-params/Impls_Macros_1.scala | 20 | ||||
-rw-r--r-- | tests/disabled/macro/run/macro-impl-default-params/Test_2.scala | 4 |
2 files changed, 24 insertions, 0 deletions
diff --git a/tests/disabled/macro/run/macro-impl-default-params/Impls_Macros_1.scala b/tests/disabled/macro/run/macro-impl-default-params/Impls_Macros_1.scala new file mode 100644 index 000000000..9b1d0eed3 --- /dev/null +++ b/tests/disabled/macro/run/macro-impl-default-params/Impls_Macros_1.scala @@ -0,0 +1,20 @@ +import scala.reflect.runtime.universe._ +import scala.reflect.macros.blackbox.Context + +object Impls { + def foo_targs[T, U: c.WeakTypeTag](c: Context = null)(x: c.Expr[Int] = null) = { + import c.{prefix => prefix} + import c.universe._ + val U = implicitly[c.WeakTypeTag[U]] + c.Expr[Unit](q""" + println("invoking foo_targs...") + println("type of prefix is: " + ${prefix.staticType.toString}) + println("type of prefix tree is: " + ${prefix.tree.tpe.toString}) + println("U is: " + ${U.tpe.toString}) + """) + } +} + +class Macros[T] { + def foo_targs[U](x: Int) = macro Impls.foo_targs[T, U] +}
\ No newline at end of file diff --git a/tests/disabled/macro/run/macro-impl-default-params/Test_2.scala b/tests/disabled/macro/run/macro-impl-default-params/Test_2.scala new file mode 100644 index 000000000..476c881f8 --- /dev/null +++ b/tests/disabled/macro/run/macro-impl-default-params/Test_2.scala @@ -0,0 +1,4 @@ +object Test extends dotty.runtime.LegacyApp { + println("foo_targs:") + new Macros[Int]().foo_targs[String](42) +}
\ No newline at end of file |