Skip to content

Commit 67fac71

Browse files
committed
Inline RefinedType.NoRefinedType at its unique use site.
The other code paths in the method have to allocate a `RefinedType` anyway, so there was no strong reason to avoid the allocation there.
1 parent de3a015 commit 67fac71

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

linker/shared/src/main/scala/org/scalajs/linker/frontend/optimizer/OptimizerCore.scala

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,7 @@ private[optimizer] abstract class OptimizerCore(
384384
* `Return`s we produce in order to decide whether we can remove
385385
* the `Labeled`.
386386
*/
387-
info.returnedTreeTypes.value ::= RefinedType.NoRefinedType
387+
info.returnedTreeTypes.value ::= RefinedType(VoidType)
388388
Return(newExpr, newLabel)
389389
}
390390
} else if (!info.acceptRecords) {
@@ -5758,8 +5758,6 @@ private[optimizer] object OptimizerCore {
57585758
}
57595759
RefinedType(tpe, isExact)
57605760
}
5761-
5762-
val NoRefinedType = RefinedType(VoidType)
57635761
}
57645762

57655763
/**

0 commit comments

Comments
 (0)