blob: 94fd99018e904fd82de6c996cc2814914e836d61 (
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[ScalaClassWithCheckedExceptions_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
}
|