Skip to content

Commit a794f6f

Browse files
committed
WIP try fixing scala#4765
1 parent 800fbbf commit a794f6f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compiler/src/dotty/tools/dotc/typer/Inliner.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -420,7 +420,7 @@ class Inliner(call: tpd.Tree, rhsToInline: tpd.Tree)(implicit ctx: Context) {
420420
/** The Inlined node representing the inlined call */
421421
def inlined(pt: Type) = {
422422
// make sure prefix is executed if it is impure
423-
if (!isIdempotentExpr(prefix)) registerType(meth.owner.thisType)
423+
if (!isPureExpr(prefix)) registerType(meth.owner.thisType)
424424

425425
// Register types of all leaves of inlined body so that the `paramProxy` and `thisProxy` maps are defined.
426426
rhsToInline.foreachSubTree(registerLeaf)

0 commit comments

Comments
 (0)