File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
compiler/src/dotty/tools/dotc/core Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -4396,13 +4396,13 @@ object Types {
4396
4396
private var myInst : Type = NoType
4397
4397
4398
4398
private [core] def inst : Type = myInst
4399
- private [core] def inst_= (tp : Type ): Unit = {
4399
+ private [core] def inst_= (tp : Type ): Unit =
4400
4400
myInst = tp
4401
- if ( tp.exists && ( owningState ne null )) {
4402
- owningState.get.ownedVars -= this
4403
- owningState = null // no longer needed; null out to avoid a memory leak
4404
- }
4405
- }
4401
+ if tp.exists && owningState != null then
4402
+ val owningState1 = owningState.get
4403
+ if owningState1 ! = null then
4404
+ owningState1.ownedVars -= this
4405
+ owningState = null // no longer needed; null out to avoid a memory leak
4406
4406
4407
4407
/** The state owning the variable. This is at first `creatorState`, but it can
4408
4408
* be changed to an enclosing state on a commit.
You can’t perform that action at this time.
0 commit comments