Skip to content

Commit b64b73c

Browse files
committed
Drop expensive escapeToNext
The `ensuring` seems to be expensive. Omiting it does not seem to cause a problem since a denotation that's valid nowhere would certainly produce other errors when accessed.
1 parent bc8df3e commit b64b73c

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

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

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -795,8 +795,6 @@ object Denotations {
795795
assert(!d.is(Package), s"illegal transformation of package denotation by transformer $transformer")
796796
case _ =>
797797

798-
def escapeToNext = nextDefined.ensuring(_.validFor != Nowhere)
799-
800798
def toNewRun =
801799
util.Stats.record("current.bringForward")
802800
if exists then initial.bringForward().current else this
@@ -871,7 +869,7 @@ object Denotations {
871869
// can happen if we sit on a stale denotation which has been replaced
872870
// wholesale by an installAfter; in this case, proceed to the next
873871
// denotation and try again.
874-
escapeToNext
872+
nextDefined
875873
else if valid.runId != currentPeriod.runId then
876874
toNewRun
877875
else if currentPeriod.code > valid.code then

0 commit comments

Comments
 (0)