summaryrefslogtreecommitdiff
path: root/test/files/run/macro-abort-fresh/Macros_1.scala
blob: 350d7b41aaa3c755264246bbf7b2726176a0adeb (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import scala.reflect.macros.BlackboxContext

object Impls {
  def impl(c: BlackboxContext) = {
    import c.universe._
    println(c.fresh())
    println(c.fresh("qwe"))
    println(c.fresh(TypeName("qwe")))
    c.abort(NoPosition, "blargh")
  }
}

object Macros {
  def foo = macro Impls.impl
}