diff --git a/build.sc b/build.sc index b843c1b..11a60d2 100755 --- a/build.sc +++ b/build.sc @@ -8,7 +8,7 @@ import mill.define.Command import mill.resolve.SelectMode import mill.resolve.Resolve object Settings { - val version = "0.11.0" + val version = "0.11.1" val pomOrg = "com.lihaoyi" val githubOrg = "com-lihaoyi" val githubRepo = "mill-moduledefs" diff --git a/moduledefs/plugin/src-3/AutoOverridePluginDotty.scala b/moduledefs/plugin/src-3/AutoOverridePluginDotty.scala index ad81004..32d94c1 100644 --- a/moduledefs/plugin/src-3/AutoOverridePluginDotty.scala +++ b/moduledefs/plugin/src-3/AutoOverridePluginDotty.scala @@ -49,7 +49,11 @@ class AutoOverridePluginDotty extends StandardPlugin { comment <- docCtx.docstring(sym) do { val text = NamedArg(valueName, Literal(Constant(comment.raw))).withSpan(span) - sym.addAnnotation(Annotation(ScalaDocAnnot, text, span)) + val annot = Annotation(ScalaDocAnnot, text, span) + sym.addAnnotation(annot) + Option.when(sym.isTerm)(sym.moduleClass) + .filter(sym => sym.exists && !sym.hasAnnotation(ScalaDocAnnot)) + .foreach(_.addAnnotation(annot)) } }