Skip to content

Commit 6251b8e

Browse files
committed
Micro-optimization for denotAt
1 parent 41c4fce commit 6251b8e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1691,7 +1691,7 @@ object Types {
16911691
* attempt in `denot` does not yield a denotation.
16921692
*/
16931693
private def denotAt(lastd: Denotation, now: Period)(implicit ctx: Context): Denotation = {
1694-
if (lastd != null && (lastd.validFor contains now) && checkedPeriod != Nowhere) {
1694+
if (checkedPeriod != Nowhere && lastd.validFor.contains(now)) {
16951695
checkedPeriod = now
16961696
lastd
16971697
}

0 commit comments

Comments
 (0)