Files
kotlin-fork/compiler/testData/codegen/box/delegatedProperty/delegateToAnother
Alexander Udalov ff65324172 JVM: use a safer version of fileParent for Java declarations
Java declarations do not have a file parent, their outer element is
IrExternalPackageFragment.

The test did not fail in K1 only by accident, because there's an extra
IrTypeOperatorCall on the property reference's dispatch receiver, which
automatically makes it non-inlinable. In K2, it's IrGetField, so we were
trying to compute if its dispatch receiver is inlinable and for that we
tried to get its fileParent, which resulted in exception if it comes
from Java.

Also refactor PropertyReferenceDelegationTransformer.canInline a bit.

 #KT-57955 Fixed
2023-05-11 13:17:34 +00:00
..