blob: 4c2a40fe87a303bba7aec1f056114927853d7171 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
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] = {
| import c.universe._
| c.Expr[String](Literal(Constant(c.enclosingPosition.getClass.toString)))
|}
|def pos = macro pos_impl
|pos
|""".stripMargin.trim
override def extraSettings: String = "-Yrangepos"
}
|