blob: 55b583d24be702f8f06e31028bf7ff9c2c0f1939 (
plain) (
tree)
|
|
// get expected error message without package declaration
package ex
import scala.language.experimental.macros
import scala.reflect.macros._
object IW {
def foo(a: String): String = ???
}
object Mac {
def mac(s: String): String = macro macImpl
def macImpl(c: Context)(s: c.Expr[String]): c.Expr[String] =
c.universe.reify(IW.foo(s.splice))
}
|