summaryrefslogtreecommitdiff
path: root/test/files/run/t7008/Impls_Macros_2.scala
blob: 7a17314085a69ecc6d7dfad6559f565932398ba3 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
import language.experimental.macros
import scala.reflect.macros.Context

object Macros {
  def impl(c: Context) = {
    val decls = c.typeOf[JavaClassWithCheckedExceptions_1[_]].declarations.toList
    val s = decls.sortBy(_.name.toString).map(decl => (s"${decl.name}: ${decl.annotations}")).mkString(scala.compat.Platform.EOL)
    c.universe.reify(println(c.literal(s).splice))
  }

  def foo = macro impl
}