diff --git a/compiler/fir/providers/src/org/jetbrains/kotlin/fir/scopes/impl/FirDynamicScope.kt b/compiler/fir/providers/src/org/jetbrains/kotlin/fir/scopes/impl/FirDynamicScope.kt index 551152d747b..ba31e295f48 100644 --- a/compiler/fir/providers/src/org/jetbrains/kotlin/fir/scopes/impl/FirDynamicScope.kt +++ b/compiler/fir/providers/src/org/jetbrains/kotlin/fir/scopes/impl/FirDynamicScope.kt @@ -128,7 +128,7 @@ class FirDynamicMembersStorage(val session: FirSession) : FirSessionComponent { private val anyArrayTypeRef = buildResolvedTypeRef { type = ConeClassLikeTypeImpl( StandardClassIds.Array.toLookupTag(), - arrayOf(session.builtinTypes.nullableAnyType.coneType), + arrayOf(dynamicTypeRef.coneType), isNullable = false ) } diff --git a/compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/spreadOperator.fir.kt b/compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/spreadOperator.fir.kt index 54d5935745d..9fa123f1188 100644 --- a/compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/spreadOperator.fir.kt +++ b/compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/spreadOperator.fir.kt @@ -2,15 +2,15 @@ fun test(d: dynamic) { val a = arrayOf(1, 2, 3) d.foo(*d) - d.foo(*a) - d.foo(1, "2", *a) - d.foo(1, *a) { } - d.foo(*a) { "" } - d.foo(*a, *a) - d.foo(*a, *a) { "" } - d.foo(*a, 1, { "" }, *a) - d.foo(*a, 1) - d.foo(*a, *a, { "" }) + d.foo(*a) + d.foo(1, "2", *a) + d.foo(1, *a) { } + d.foo(*a) { "" } + d.foo(*a, *a) + d.foo(*a, *a) { "" } + d.foo(*a, 1, { "" }, *a) + d.foo(*a, 1) + d.foo(*a, *a, { "" }) bar(d) bar(d, d) diff --git a/compiler/testData/diagnostics/testsWithJsStdLib/dynamicUnresolved.fir.kt b/compiler/testData/diagnostics/testsWithJsStdLib/dynamicUnresolved.fir.kt deleted file mode 100644 index fefa94b6af8..00000000000 --- a/compiler/testData/diagnostics/testsWithJsStdLib/dynamicUnresolved.fir.kt +++ /dev/null @@ -1,15 +0,0 @@ -// ISSUE: KT-57665 -// DIAGNOSTICS: -UNUSED_PARAMETER - -fun T.foo(a: String, b: (T) -> Unit) { - this.asDynamic().goo(jso { - this.asjhasdas - }) -} - -fun jso(): T = - js("({})") - -fun jso( - block: T.() -> Unit, -): T = jso().apply(block) diff --git a/compiler/testData/diagnostics/testsWithJsStdLib/dynamicUnresolved.kt b/compiler/testData/diagnostics/testsWithJsStdLib/dynamicUnresolved.kt index f4608724d50..ee01624cd3f 100644 --- a/compiler/testData/diagnostics/testsWithJsStdLib/dynamicUnresolved.kt +++ b/compiler/testData/diagnostics/testsWithJsStdLib/dynamicUnresolved.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL // ISSUE: KT-57665 // DIAGNOSTICS: -UNUSED_PARAMETER