blob: 4c2a40fe87a303bba7aec1f056114927853d7171 (
plain) (
tree)
|
|
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"
}
|