[K/N] Disable scope initialization on constant access
^KT-57098
This commit is contained in:
committed by
Space Team
parent
e6297f92fa
commit
62fb3df7f0
+3
-1
@@ -33,7 +33,9 @@ abstract class InlineConstTransformer : IrElementTransformerVoid() {
|
||||
|
||||
abstract fun reportInlineConst(field: IrField, value: IrConst<*>)
|
||||
|
||||
abstract fun IrExpression.shouldDropConstReceiver(): Boolean
|
||||
fun IrExpression.shouldDropConstReceiver(): Boolean {
|
||||
return this is IrConst<*> || this is IrGetValue || this is IrGetObjectValue
|
||||
}
|
||||
|
||||
override fun visitCall(expression: IrCall): IrExpression {
|
||||
val function = (expression.symbol.owner as? IrSimpleFunction) ?: return super.visitCall(expression)
|
||||
|
||||
-2
@@ -50,6 +50,4 @@ private class JvmInlineConstTransformer(val irFile: IrFile, val inlineConstTrack
|
||||
|
||||
inlineConstTracker.report(path, owner, name, constType)
|
||||
}
|
||||
|
||||
override fun IrExpression.shouldDropConstReceiver() = this is IrConst<*> || this is IrGetValue || this is IrGetObjectValue
|
||||
}
|
||||
Reference in New Issue
Block a user