Skip to content

Commit f992f7a

Browse files
committed
Inline rollbackGadtUnless in GadtConstraint
It's not that large, is only used twice, and inlining it saves two argument closures per call.
1 parent b28faf9 commit f992f7a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compiler/src/dotty/tools/dotc/core/GadtConstraint.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ sealed trait GadtConstraint (
209209
this.reverseMapping = revMapping
210210
this.wasConstrained = wasConstrained
211211

212-
def rollbackGadtUnless(op: => Boolean): Boolean =
212+
inline def rollbackGadtUnless(inline op: Boolean): Boolean =
213213
val savedConstr = myConstraint
214214
val savedMapping = mapping
215215
val savedReverseMapping = reverseMapping

0 commit comments

Comments
 (0)