Skip to content

Commit 644bd7f

Browse files
authored
Scaladoc cc: don't eagerly drop caps on parameters (#23759)
If parameters have caps.cap as the only capture set, we would previously eagerly drop them, as caps.cap.type is thought of as being a pure class :/
2 parents 3349444 + 705fe5f commit 644bd7f

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -535,6 +535,7 @@ trait TypesSupport:
535535
private def isCapturedInContext(using Quotes)(ref: reflect.TypeRepr)(using elideThis: reflect.ClassDef): Boolean =
536536
import reflect._
537537
ref match
538+
case t if t.isCaptureRoot => true
538539
case ReachCapability(c) => isCapturedInContext(c)
539540
case ReadOnlyCapability(c) => isCapturedInContext(c)
540541
case ThisType(tr) => !elideThis.symbol.typeRef.isPureClass(elideThis) /* is the current class pure? */

0 commit comments

Comments
 (0)