Skip to content

Commit f3206a2

Browse files
authored
All traits compile to public interfaces (#162)
1 parent a3a6ab5 commit f3206a2

File tree

1 file changed

+2
-3
lines changed
  • plugin/src/main/scala/com/typesafe/genjavadoc

1 file changed

+2
-3
lines changed

plugin/src/main/scala/com/typesafe/genjavadoc/AST.scala

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -161,11 +161,10 @@ trait AST { this: TransformCake ⇒
161161
}
162162

163163
private def access(m: Modifiers, topLevel: Boolean): String = {
164-
if (m.isTrait || m.isInterface) "public"
165-
else if (m.isPublic) "public"
164+
if (m.isPublic || m.isTrait) "public"
166165
else if (m.isProtected && !topLevel) "protected"
167166
else if (m.isPrivate && !topLevel) {
168-
if (m.hasStaticFlag) "" else "private"
167+
if (m.isInterface || m.hasStaticFlag) "" else "private"
169168
}
170169
else if (strictVisibility && m.privateWithin != tpnme.EMPTY) ""
171170
else "public" // this is the case for top level classes

0 commit comments

Comments
 (0)