diff options
Diffstat (limited to 'tests/disabled/macro/run/showdecl/Test_2.scala')
-rw-r--r-- | tests/disabled/macro/run/showdecl/Test_2.scala | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/tests/disabled/macro/run/showdecl/Test_2.scala b/tests/disabled/macro/run/showdecl/Test_2.scala new file mode 100644 index 000000000..fc212ab05 --- /dev/null +++ b/tests/disabled/macro/run/showdecl/Test_2.scala @@ -0,0 +1,32 @@ +import scala.reflect.runtime.universe._ +import scala.reflect.runtime.{currentMirror => cm} + +object Test extends dotty.runtime.LegacyApp { + def test(sym: Symbol): Unit = { + println(s"autoinitialized ${sym.name}: ${showDecl(sym)}") + sym.info + println(s"autoinitialized ${sym.name}: ${showDecl(sym)}") + } + + Macros.foo + println("runtime") + test(symbolOf[D]) + test(typeOf[D].member(TermName("x"))) + test(typeOf[D].member(TermName("y"))) + test(typeOf[D].member(TermName("z"))) + test(typeOf[D].member(TermName("t"))) + test(typeOf[D].member(TypeName("W"))) + test(typeOf[D].member(TypeName("C"))) + test(typeOf[D].member(TermName("O"))) +} + +class C +class D extends C { + val x = 2 + lazy val y = 3 + var z = 4 + def t[T <: Int](x: D)(y: x.W) = 5 + type W = String + class C extends D + object O extends C +} |