Skip to content

Commit 918bce5

Browse files
KacperFKorbantanishiking
authored andcommitted
Docs leaking self type methods
fixes scala#13203
1 parent aa4fce8 commit 918bce5

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
package tests.selftypes
2+
3+
class A:
4+
def a: Unit = ???
5+
6+
class HasASelfType:
7+
self: A =>
8+
def b: Unit = ???

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

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -75,11 +75,7 @@ object SyntheticsSupport:
7575
given ctx: dotc.core.Contexts.Context = quotes.asInstanceOf[scala.quoted.runtime.impl.QuotesImpl].ctx
7676
val sym = rsym.asInstanceOf[dotc.core.Symbols.Symbol]
7777
// `lookupPrefix` is private in `QuotesImpl#SymbolMethods`
78-
val lookupPrefix =
79-
if sym.isClass then
80-
sym.thisType
81-
else
82-
sym.namedType
78+
val lookupPrefix = sym.namedType
8379
lookupPrefix.allMembers.iterator.map(_.symbol)
8480
.collect {
8581
case sym if

0 commit comments

Comments
 (0)