summaryrefslogblamecommitdiff
path: root/test/files/pos/t8781/Macro_1.scala
blob: ecd9c5e8d5cf42fbf76d5f8c2d057ee815bc6fb5 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13












                                            
import scala.reflect.macros.whitebox.Context
import language.experimental.macros

object Macros {
  def impl(c: Context) = {
    import c.universe._
    val name = TypeName(c.freshName())
    q"class $name extends T; new $name"
  }
  def fresh: Any = macro impl
}

trait T