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.scala6
1 files changed, 4 insertions, 2 deletions
diff --git a/test/files/run/t6381.scala b/test/files/run/t6381.scala
index 859ec3cb30..4c2a40fe87 100644
--- a/test/files/run/t6381.scala
+++ b/test/files/run/t6381.scala
@@ -3,8 +3,10 @@ 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_impl(c: reflect.macros.Context): c.Expr[String] = {
+ | import c.universe._
+ | c.Expr[String](Literal(Constant(c.enclosingPosition.getClass.toString)))
+ |}
|def pos = macro pos_impl
|pos
|""".stripMargin.trim