Skip to content

Commit 6bb20b3

Browse files
authored
Merge pull request #5808 from dotty-staging/fix-cache-termref
Fix caching of TermRef
2 parents 3283701 + 9ed41c6 commit 6bb20b3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -752,15 +752,15 @@ object Denotations {
752752

753753
/** The TypeRef representing this type denotation at its original location. */
754754
def typeRef(implicit ctx: Context): TypeRef =
755-
TypeRef(symbol.owner.thisType, symbol.name.asTypeName, this)
755+
TypeRef(symbol.owner.thisType, symbol).withDenot(this)
756756

757757
/** The typeRef applied to its own type parameters */
758758
def appliedRef(implicit ctx: Context): Type =
759759
typeRef.appliedTo(symbol.typeParams.map(_.typeRef))
760760

761761
/** The TermRef representing this term denotation at its original location. */
762762
def termRef(implicit ctx: Context): TermRef =
763-
TermRef(symbol.owner.thisType, symbol.name.asTermName, this)
763+
TermRef(symbol.owner.thisType, symbol).withDenot(this)
764764

765765
/** The NamedType representing this denotation at its original location.
766766
* Same as either `typeRef` or `termRef` depending whether this denotes a type or not.

0 commit comments

Comments
 (0)