Skip to content

Commit f810049

Browse files
committed
Address review
Co-authored-by: Guillaume Martres [email protected]
1 parent 67c3acf commit f810049

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

compiler/src/dotty/tools/dotc/core/SymDenotations.scala

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1410,23 +1410,27 @@ object SymDenotations {
14101410
def namedType(using Context): NamedType =
14111411
if (isType) typeRef else termRef
14121412

1413-
/** The typeRef where `pre.O$.this` is changed to `pre.O.type` if `O` is a non-static object
1413+
/** Like typeRef, but objects in the prefix are represented by their singleton type,
1414+
* this means we output `pre.O.member` rather than `pre.O$.this.member`.
14141415
*
14151416
* This is required to avoid owner crash in ExplicitOuter.
14161417
* See tests/pos/i10769.scala
14171418
*/
14181419
def reachableTypeRef(using Context) =
14191420
TypeRef(owner.reachableThisType, symbol)
14201421

1421-
/** The termRef where `pre.O$.this` is changed to `pre.O.type` if `O` is a non-static object
1422+
/** Like termRef, but objects in the prefix are represented by their singleton type,
1423+
* this means we output `pre.O.member` rather than `pre.O$.this.member`.
14221424
*
14231425
* This is required to avoid owner crash in ExplicitOuter.
14241426
* See tests/pos/i10769.scala
14251427
*/
14261428
def reachableTermRef(using Context) =
14271429
TermRef(owner.reachableThisType, symbol)
14281430

1429-
/** The thisType where `pre.O$.this` is changed to `pre.O.type` if `O` is a non-static object */
1431+
/** Like thisType, but objects in the type are represented by their singleton type,
1432+
* this means we output `pre.O.member` rather than `pre.O$.this.member`.
1433+
*/
14301434
def reachableThisType(using Context): Type =
14311435
if this.is(Package) then
14321436
symbol.thisType

0 commit comments

Comments
 (0)