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