diff options
Diffstat (limited to 'tests/disabled/macro/run/macro-reify-staticXXX')
-rw-r--r-- | tests/disabled/macro/run/macro-reify-staticXXX/Macros_1.scala | 48 | ||||
-rw-r--r-- | tests/disabled/macro/run/macro-reify-staticXXX/Test_2.scala | 4 |
2 files changed, 52 insertions, 0 deletions
diff --git a/tests/disabled/macro/run/macro-reify-staticXXX/Macros_1.scala b/tests/disabled/macro/run/macro-reify-staticXXX/Macros_1.scala new file mode 100644 index 000000000..2993218bb --- /dev/null +++ b/tests/disabled/macro/run/macro-reify-staticXXX/Macros_1.scala @@ -0,0 +1,48 @@ +import scala.reflect.macros.blackbox.Context + +object B { override def toString = "object" } +class C { override def toString = "class" } + +package foo { + object B { override def toString = "package > object" } + class C { override def toString = "package > class" } +} + +object foo { + object B { override def toString = "object > object" } + class C { override def toString = "object > class" } +} + +object packageless { + def impl(c: Context) = { + import c.universe._ + reify { + println(B) + println(new C) + println(foo.B) + println(new foo.C) + println(_root_.foo.B) + println(new _root_.foo.C) + } + } + + def test = macro impl +} + +package packageful { + object Test { + def impl(c: Context) = { + import c.universe._ + reify { + println(B) + println(new C) + println(foo.B) + println(new foo.C) + println(_root_.foo.B) + println(new _root_.foo.C) + } + } + + def test = macro impl + } +} diff --git a/tests/disabled/macro/run/macro-reify-staticXXX/Test_2.scala b/tests/disabled/macro/run/macro-reify-staticXXX/Test_2.scala new file mode 100644 index 000000000..4c02e26f6 --- /dev/null +++ b/tests/disabled/macro/run/macro-reify-staticXXX/Test_2.scala @@ -0,0 +1,4 @@ +object Test extends dotty.runtime.LegacyApp { + packageless.test + packageful.Test.test +} |