Skip to content

Commit 7f847cb

Browse files
committed
Use NamedType#stableInRunSymbol more
1 parent 9e06db7 commit 7f847cb

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

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

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2677,9 +2677,7 @@ object Types {
26772677
else {
26782678
if (isType) {
26792679
val res =
2680-
val sym =
2681-
if (currentSymbol.isValidInCurrentRun) currentSymbol
2682-
else computeSymbol
2680+
val sym = stableInRunSymbol
26832681
if (sym.isAllOf(ClassTypeParam)) argForParam(prefix)
26842682
else prefix.lookupRefined(name)
26852683
if (res.exists) return res
@@ -2754,9 +2752,7 @@ object Types {
27542752
/** A reference like this one, but with the given prefix. */
27552753
final def withPrefix(prefix: Type)(using Context): Type = {
27562754
def reload(): NamedType = {
2757-
val sym =
2758-
if lastSymbol.nn.isValidInCurrentRun then lastSymbol.nn
2759-
else computeSymbol
2755+
val sym = stableInRunSymbol
27602756
val allowPrivate = !sym.exists || sym.is(Private)
27612757
var d = memberDenot(prefix, name, allowPrivate)
27622758
if (d.isOverloaded && sym.exists)

0 commit comments

Comments
 (0)