File tree 3 files changed +814
-6
lines changed
compiler/src/dotty/tools/dotc/core
3 files changed +814
-6
lines changed Original file line number Diff line number Diff line change @@ -8,3 +8,12 @@ updates:
8
8
- hamzaremmal
9
9
reviewers :
10
10
- hamzaremmal
11
+ - package-ecosystem : bundler
12
+ directory : ' /docs/_spec'
13
+ schedule :
14
+ interval : weekly
15
+ assignees :
16
+ - hamzaremmal
17
+ reviewers :
18
+ - hamzaremmal
19
+
Original file line number Diff line number Diff line change @@ -3695,6 +3695,7 @@ object Types extends TypeUtils {
3695
3695
myUnion
3696
3696
3697
3697
private var atomsRunId : RunId = NoRunId
3698
+ private var widenedRunId : RunId = NoRunId
3698
3699
private var myAtoms : Atoms = uninitialized
3699
3700
private var myWidened : Type = uninitialized
3700
3701
@@ -3710,20 +3711,18 @@ object Types extends TypeUtils {
3710
3711
val tp2w = tp2.widenSingletons()
3711
3712
if ((tp1 eq tp1w) && (tp2 eq tp2w)) this else TypeComparer .lub(tp1w, tp2w, isSoft = isSoft)
3712
3713
3713
- private def ensureAtomsComputed ()( using Context ): Unit =
3714
+ override def atoms ( using Context ): Atoms =
3714
3715
if atomsRunId != ctx.runId then
3715
3716
myAtoms = computeAtoms()
3716
- myWidened = computeWidenSingletons()
3717
3717
if ! isProvisional then atomsRunId = ctx.runId
3718
-
3719
- override def atoms (using Context ): Atoms =
3720
- ensureAtomsComputed()
3721
3718
myAtoms
3722
3719
3723
3720
override def widenSingletons (skipSoftUnions : Boolean )(using Context ): Type =
3724
3721
if isSoft && skipSoftUnions then this
3725
3722
else
3726
- ensureAtomsComputed()
3723
+ if widenedRunId != ctx.runId then
3724
+ myWidened = computeWidenSingletons()
3725
+ if ! isProvisional then widenedRunId = ctx.runId
3727
3726
myWidened
3728
3727
3729
3728
def derivedOrType (tp1 : Type , tp2 : Type , soft : Boolean = isSoft)(using Context ): Type =
You can’t perform that action at this time.
0 commit comments