Skip to content

Commit 86868c3

Browse files
committed
Fix synthetic members being added to docs
1 parent c14aa53 commit 86868c3

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

doc-tool/src/dotty/tools/dottydoc/core/DocASTPhase.scala

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,8 @@ class DocASTPhase extends Phase {
8282
}
8383

8484

85-
tree match {
85+
if (tree.symbol.is(Flags.Synthetic) && !tree.symbol.is(Flags.Module)) NonEntity
86+
else tree match {
8687
/** package */
8788
case pd @ PackageDef(pid, st) =>
8889
addPackage(PackageImpl(pd.symbol, annotations(pd.symbol), pd.symbol.showFullName, collectEntityMembers(st), path(pd.symbol)))

doc-tool/test/SourceFileOps.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import model.Package
1111

1212
trait SourceFileOps {
1313
import scala.collection.JavaConverters._
14-
val site = new Site(new java.io.File("../doc-tool/resources/"), "test-site", Map.empty)
14+
val site = new Site(new java.io.File("../doc-tool/resources/"), "test-site", "v0.1", Map.empty)
1515

1616
def stringToSource(path: String, sourceCode: String): SourceFile = {
1717
val virtualFile = new VirtualFile(path, path)

0 commit comments

Comments
 (0)