未验证 提交 f9bae787 编写于 作者: 梦境迷离's avatar 梦境迷离 提交者: GitHub

Update MacroCommon.scala

上级 24699f9c
......@@ -66,7 +66,7 @@ trait MacroCommon {
annotateeClass match {
case q"$mods class $tpname[..$tparams] $ctorMods(...$paramss) extends { ..$earlydefns } with ..$parents { $self => ..$stats }" =>
if (mods.asInstanceOf[Modifiers].hasFlag(Flag.CASE)) {
c.info(c.enclosingPosition, "Annotation is used on 'case class'.")
c.info(c.enclosingPosition, "Annotation is used on 'case class'.", true)
true
} else false
case _ => c.abort(c.enclosingPosition, s"Annotation is only supported on class. classDef: $annotateeClass")
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册