Skip to content

Commit 4b69e90

Browse files
committed
Fix Space traces
1 parent 5f0c945 commit 4b69e90

File tree

1 file changed

+4
-4
lines changed
  • compiler/src/dotty/tools/dotc/transform/patmat

1 file changed

+4
-4
lines changed

compiler/src/dotty/tools/dotc/transform/patmat/Space.scala

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ object SpaceEngine {
115115
def decompose(typ: Typ)(using Context): List[Typ] = typ.decompose
116116

117117
/** Simplify space such that a space equal to `Empty` becomes `Empty` */
118-
def computeSimplify(space: Space)(using Context): Space = trace(s"simplify($space)")(space match {
118+
def computeSimplify(space: Space)(using Context): Space = trace(i"simplify($space)")(space match {
119119
case Prod(tp, fun, spaces) =>
120120
val sps = spaces.mapconserve(simplify)
121121
if sps.contains(Empty) then Empty
@@ -166,7 +166,7 @@ object SpaceEngine {
166166
}
167167

168168
/** Is `a` a subspace of `b`? Equivalent to `simplify(simplify(a) - simplify(b)) == Empty`, but faster */
169-
def computeIsSubspace(a: Space, b: Space)(using Context): Boolean = trace(s"isSubspace($a, $b)") {
169+
def computeIsSubspace(a: Space, b: Space)(using Context): Boolean = trace(i"isSubspace($a, $b)") {
170170
val a2 = simplify(a)
171171
val b2 = simplify(b)
172172
if (a ne a2) || (b ne b2) then isSubspace(a2, b2)
@@ -195,7 +195,7 @@ object SpaceEngine {
195195
}
196196

197197
/** Intersection of two spaces */
198-
def intersect(a: Space, b: Space)(using Context): Space = trace(s"$a & $b") {
198+
def intersect(a: Space, b: Space)(using Context): Space = trace(i"intersect($a & $b)") {
199199
(a, b) match {
200200
case (Empty, _) | (_, Empty) => Empty
201201
case (_, Or(ss)) => Or(ss.map(intersect(a, _)).filter(_ ne Empty))
@@ -220,7 +220,7 @@ object SpaceEngine {
220220
}
221221

222222
/** The space of a not covered by b */
223-
def minus(a: Space, b: Space)(using Context): Space = trace(s"$a - $b") {
223+
def minus(a: Space, b: Space)(using Context): Space = trace(i"minus($a - $b)") {
224224
(a, b) match {
225225
case (Empty, _) => Empty
226226
case (_, Empty) => a

0 commit comments

Comments
 (0)