Skip to content

Commit

Permalink
Space: Initialise caches with null
Browse files Browse the repository at this point in the history
  • Loading branch information
dwijnand committed Feb 22, 2023
1 parent a585898 commit daef636
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions compiler/src/dotty/tools/dotc/transform/patmat/Space.scala
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ sealed trait Space:
isSubspaceCache.getOrElseUpdate(b, computeIsSubspace(a, b))
}

@sharable private var mySimplified: Space | Null = _
@sharable private var mySimplified: Space | Null = null

def simplify(using Context): Space =
val simplified = mySimplified
Expand All @@ -93,7 +93,7 @@ case object Empty extends Space
*
*/
case class Typ(tp: Type, decomposed: Boolean = true) extends Space:
private var myDecompose: List[Typ] | Null = _
private var myDecompose: List[Typ] | Null = null

def canDecompose(using Context): Boolean = decompose != SpaceEngine.ListOfTypNoType

Expand Down

0 comments on commit daef636

Please sign in to comment.