aboutsummaryrefslogtreecommitdiff
path: root/tests/pending/run/toolbox_current_run_compiles.scala
diff options
context:
space:
mode:
Diffstat (limited to 'tests/pending/run/toolbox_current_run_compiles.scala')
-rw-r--r--tests/pending/run/toolbox_current_run_compiles.scala28
1 files changed, 0 insertions, 28 deletions
diff --git a/tests/pending/run/toolbox_current_run_compiles.scala b/tests/pending/run/toolbox_current_run_compiles.scala
deleted file mode 100644
index 702741c2e..000000000
--- a/tests/pending/run/toolbox_current_run_compiles.scala
+++ /dev/null
@@ -1,28 +0,0 @@
-package pkg {
- import scala.reflect.macros.blackbox.Context
- import scala.language.experimental.macros
-
- object Macros {
- def impl[T: c.WeakTypeTag](c: Context) = {
- import c.universe._
- val sym = c.weakTypeOf[T].typeSymbol
- val g = c.universe.asInstanceOf[scala.tools.nsc.Global]
- c.Expr[Boolean](Literal(Constant(g.currentRun.compiles(sym.asInstanceOf[g.Symbol]))))
- }
- def compiles[T]: Boolean = macro impl[T]
- }
-}
-
-import scala.reflect.runtime.universe._
-import scala.reflect.runtime.{universe => ru}
-import scala.tools.reflect.ToolBox
-
-object Test extends dotty.runtime.LegacyApp {
- val cm = ru.runtimeMirror(getClass.getClassLoader)
- val toolbox = cm.mkToolBox()
- toolbox.eval(toolbox.parse("""{
- class C
- println(pkg.Macros.compiles[C])
- println(pkg.Macros.compiles[Object])
- }"""))
-}