diff options
Diffstat (limited to 'tests/disabled/macro/run/typecheck')
-rw-r--r-- | tests/disabled/macro/run/typecheck/Macros_1.scala | 12 | ||||
-rw-r--r-- | tests/disabled/macro/run/typecheck/Test_2.scala | 10 |
2 files changed, 22 insertions, 0 deletions
diff --git a/tests/disabled/macro/run/typecheck/Macros_1.scala b/tests/disabled/macro/run/typecheck/Macros_1.scala new file mode 100644 index 000000000..ee1c8da76 --- /dev/null +++ b/tests/disabled/macro/run/typecheck/Macros_1.scala @@ -0,0 +1,12 @@ +import scala.reflect.macros.whitebox._ +import scala.language.experimental.macros + +object Macros { + def impl(c: Context) = { + import c.universe._ + c.typecheck(q"class C") + q"()" + } + + def foo: Any = macro impl +}
\ No newline at end of file diff --git a/tests/disabled/macro/run/typecheck/Test_2.scala b/tests/disabled/macro/run/typecheck/Test_2.scala new file mode 100644 index 000000000..b79cc3b31 --- /dev/null +++ b/tests/disabled/macro/run/typecheck/Test_2.scala @@ -0,0 +1,10 @@ +import scala.reflect.runtime.universe._ +import scala.reflect.runtime.{currentMirror => cm} +import scala.tools.reflect.ToolBox + +object Test extends dotty.runtime.LegacyApp { + Macros.foo + + val tb = cm.mkToolBox() + tb.typecheck(q"class C") +}
\ No newline at end of file |