@@ -29,7 +29,7 @@ object TyperState {
29
29
def snapshot ()(using Context ): Snapshot =
30
30
var previouslyInstantiated : TypeVars = SimpleIdentitySet .empty
31
31
for tv <- ts.ownedVars do if tv.inst.exists then previouslyInstantiated += tv
32
- (ts.constraint, ts.ownedVars, previouslyInstantiated, ts.rigidVars )
32
+ (ts.constraint, ts.ownedVars, previouslyInstantiated, ts.hardVars )
33
33
34
34
def resetTo (state : Snapshot )(using Context ): Unit =
35
35
val (c, tvs, previouslyInstantiated, rvars) = state
@@ -38,7 +38,7 @@ object TyperState {
38
38
tv.resetInst(ts)
39
39
ts.ownedVars = tvs
40
40
ts.constraint = c
41
- ts.rigidVars = rvars
41
+ ts.hardVars = rvars
42
42
}
43
43
44
44
class TyperState () {
@@ -94,9 +94,9 @@ class TyperState() {
94
94
* its lower bound, top-level soft unions in the instance type are converted
95
95
* to hard unions instead of being widened in `widenOr`.
96
96
*/
97
- private var myRigidVars : TypeVars = _
98
- def rigidVars : TypeVars = myRigidVars
99
- def rigidVars_ = (tvs : TypeVars ): Unit = myRigidVars = tvs
97
+ private var myHardVars : TypeVars = _
98
+ def hardVars : TypeVars = myHardVars
99
+ def hardVars_ = (tvs : TypeVars ): Unit = myHardVars = tvs
100
100
101
101
/** Initializes all fields except reporter, isCommittable, which need to be
102
102
* set separately.
@@ -108,7 +108,7 @@ class TyperState() {
108
108
this .myConstraint = constraint
109
109
this .previousConstraint = constraint
110
110
this .myOwnedVars = SimpleIdentitySet .empty
111
- this .myRigidVars = SimpleIdentitySet .empty
111
+ this .myHardVars = SimpleIdentitySet .empty
112
112
this .isCommitted = false
113
113
this
114
114
@@ -119,7 +119,7 @@ class TyperState() {
119
119
val ts = TyperState ().init(this , this .constraint)
120
120
.setReporter(reporter)
121
121
.setCommittable(committable)
122
- ts.rigidVars = this .rigidVars
122
+ ts.hardVars = this .hardVars
123
123
ts
124
124
125
125
/** The uninstantiated variables */
@@ -173,7 +173,7 @@ class TyperState() {
173
173
constr.println(i " committing $this to $targetState, fromConstr = $constraint, toConstr = ${targetState.constraint}" )
174
174
if targetState.constraint eq previousConstraint then
175
175
targetState.constraint = constraint
176
- targetState.rigidVars = rigidVars
176
+ targetState.hardVars = hardVars
177
177
if ! ownedVars.isEmpty then ownedVars.foreach(targetState.includeVar)
178
178
else
179
179
targetState.mergeConstraintWith(this )
@@ -226,7 +226,7 @@ class TyperState() {
226
226
val otherLos = other.lower(p)
227
227
val otherHis = other.upper(p)
228
228
val otherEntry = other.entry(p)
229
- if that.rigidVars .contains(tv) then this .myRigidVars += tv
229
+ if that.hardVars .contains(tv) then this .myHardVars += tv
230
230
( (otherLos eq constraint.lower(p)) || otherLos.forall(_ <:< p)) &&
231
231
( (otherHis eq constraint.upper(p)) || otherHis.forall(p <:< _)) &&
232
232
((otherEntry eq constraint.entry(p)) || otherEntry.match
0 commit comments