summaryrefslogblamecommitdiff
path: root/test/files/neg/t7519-b/Mac_1.scala
blob: 55b583d24be702f8f06e31028bf7ff9c2c0f1939 (plain) (tree)
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))
}