diff --git a/compiler/src/dotty/tools/dotc/typer/Inliner.scala b/compiler/src/dotty/tools/dotc/typer/Inliner.scala index cd55764631a6..e69f64e32b09 100644 --- a/compiler/src/dotty/tools/dotc/typer/Inliner.scala +++ b/compiler/src/dotty/tools/dotc/typer/Inliner.scala @@ -420,7 +420,7 @@ class Inliner(call: tpd.Tree, rhsToInline: tpd.Tree)(implicit ctx: Context) { /** The Inlined node representing the inlined call */ def inlined(pt: Type) = { // make sure prefix is executed if it is impure - if (!isIdempotentExpr(prefix)) registerType(meth.owner.thisType) + if (!isPureExpr(prefix)) registerType(meth.owner.thisType) // Register types of all leaves of inlined body so that the `paramProxy` and `thisProxy` maps are defined. rhsToInline.foreachSubTree(registerLeaf)