summaryrefslogblamecommitdiff
path: root/test/files/run/macro-expand-implicit-macro-is-view/Impls_1.scala
blob: cceb038f05b595d2ff7a3f417d89b8f84f98300c (plain) (tree)
1
2
3
4
5
6
7
8
9
                                            


                                                             
                       
                                                                                               
                             
   
 
import scala.reflect.macros.{Context => Ctx}

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