Skip to content

Commit 3f4fee2

Browse files
authored
Filter opaque modifier from object documentation (#21640)
Fixes #21228
2 parents e5f7272 + 4ae882f commit 3f4fee2

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

scaladoc-testcases/src/tests/opaqueTypes.scala

+5-1
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,8 @@ opaque type Permissions
66
= Int
77
opaque type PermissionChoice
88
= Int
9-
//opaque type Permission <: Permissions & PermissionChoice = Int TODO: #112
9+
//opaque type Permission <: Permissions & PermissionChoice = Int TODO: #112
10+
11+
object Foo:
12+
opaque type Bar
13+
= Int

scaladoc/src/dotty/tools/scaladoc/tasty/ClassLikeSupport.scala

+1-1
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ trait ClassLikeSupport:
314314
def parseObject(classDef: ClassDef, signatureOnly: Boolean = false): Member =
315315
mkClass(classDef)(
316316
// All objects are final so we do not need final modifier!
317-
modifiers = classDef.symbol.getExtraModifiers().filter(_ != Modifier.Final),
317+
modifiers = classDef.symbol.getExtraModifiers().filter(mod => mod != Modifier.Final && mod != Modifier.Opaque),
318318
signatureOnly = signatureOnly
319319
)
320320

0 commit comments

Comments
 (0)