[LL FIR] do not treat content of script initializers as non-local

^KT-61260 Fixed
This commit is contained in:
Dmitrii Gridin
2023-08-16 17:14:55 +02:00
committed by Space Team
parent 1a21affe1d
commit 17d0017fbf
2 changed files with 3 additions and 3 deletions
@@ -270,7 +270,7 @@ internal fun getNonLocalContainingDeclaration(
if (parent is KtEnumEntry ||
parent is KtCallableDeclaration &&
!notNullCandidate.isPartOf(parent) ||
parent is KtClassInitializer ||
parent is KtAnonymousInitializer ||
parent is KtObjectLiteralExpression ||
parent is KtCallElement ||
parent is KtCodeFragment
@@ -1,4 +1,4 @@
/* anchor --> */for (/* anchor --> */(index, _)/* <-- */ in emptyList<Int>().withIndex()) {
/* anchor --> */for ((index, _) in emptyList<Int>().withIndex()) {
}
/* <-- */
/* <-- */