aboutsummaryrefslogtreecommitdiff
path: root/tests/untried/neg-with-implicits/t7519-b/Mac_1.scala
blob: a9ecfd976622884db2acdf783dc97014c6f88bf9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// 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))
}