diff options
Diffstat (limited to 'test/files/run/t6381.scala')
-rw-r--r-- | test/files/run/t6381.scala | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/files/run/t6381.scala b/test/files/run/t6381.scala new file mode 100644 index 0000000000..5a687c10c1 --- /dev/null +++ b/test/files/run/t6381.scala @@ -0,0 +1,15 @@ +import scala.tools.partest.ReplTest + +object Test extends ReplTest { + def code = """ + |import scala.language.experimental.macros + |def pos_impl(c: scala.reflect.macros.blackbox.Context): c.Expr[String] = { + | import c.universe._ + | c.Expr[String](Literal(Constant(c.enclosingPosition.getClass.toString))) + |} + |def pos: String = macro pos_impl + |pos + |""".stripMargin.trim + + override def extraSettings: String = "-Yrangepos" +} |