summaryrefslogtreecommitdiff
path: root/test/files/run/macro-expand-implicit-macro-is-view/Impls_1.scala
blob: aeceee5a5b55d66f0944da0cd37b23f7f8a2ef8f (plain) (blame)
1
2
3
4
5
6
7
8
9
import scala.reflect.macros.blackbox.Context

object Impls {
  def foo(c: Context)(x: c.Expr[String]): c.Expr[Option[Int]] = {
    import c.universe._
    val body = Apply(Ident(definitions.SomeModule), List(Select(x.tree, TermName("toInt"))))
    c.Expr[Option[Int]](body)
  }
}