aboutsummaryrefslogtreecommitdiff
path: root/tests/disabled/macro/run/macro-expand-implicit-macro-has-implicit
diff options
context:
space:
mode:
Diffstat (limited to 'tests/disabled/macro/run/macro-expand-implicit-macro-has-implicit')
-rw-r--r--tests/disabled/macro/run/macro-expand-implicit-macro-has-implicit/Impls_1.scala9
-rw-r--r--tests/disabled/macro/run/macro-expand-implicit-macro-has-implicit/Macros_Test_2.scala5
2 files changed, 14 insertions, 0 deletions
diff --git a/tests/disabled/macro/run/macro-expand-implicit-macro-has-implicit/Impls_1.scala b/tests/disabled/macro/run/macro-expand-implicit-macro-has-implicit/Impls_1.scala
new file mode 100644
index 000000000..18c97956e
--- /dev/null
+++ b/tests/disabled/macro/run/macro-expand-implicit-macro-has-implicit/Impls_1.scala
@@ -0,0 +1,9 @@
+import scala.reflect.macros.blackbox.Context
+
+object Impls {
+ def foo(c: Context)(x: c.Expr[Int]) = {
+ import c.universe._
+ val body = Apply(Select(Ident(definitions.PredefModule), TermName("println")), List(x.tree))
+ c.Expr[Unit](body)
+ }
+} \ No newline at end of file
diff --git a/tests/disabled/macro/run/macro-expand-implicit-macro-has-implicit/Macros_Test_2.scala b/tests/disabled/macro/run/macro-expand-implicit-macro-has-implicit/Macros_Test_2.scala
new file mode 100644
index 000000000..2f5648758
--- /dev/null
+++ b/tests/disabled/macro/run/macro-expand-implicit-macro-has-implicit/Macros_Test_2.scala
@@ -0,0 +1,5 @@
+object Test extends dotty.runtime.LegacyApp {
+ implicit val x = 42
+ def foo(implicit x: Int): Unit = macro Impls.foo
+ foo
+} \ No newline at end of file