commit | 32fe83ea52e600ccabb34a57da1fed40626ef4b3 | [log] [tgz] |
---|---|---|
author | Nikita Bobko <nikita.bobko@jetbrains.com> | Tue Jun 04 19:12:37 2024 +0200 |
committer | Nikita Bobko <nikita.bobko@jetbrains.com> | Thu Jun 06 11:50:52 2024 +0200 |
tree | b8dacadde0baa02ab4394b99620a1de7ad261949 | |
parent | d5a49665a7567f3966ff3f83c2599578ef737b6e [diff] |
[IR] 2/2 Fix bug: IR didn't match private expect constructor with appropriate actual ^KT-68798 Fixed Review: https://jetbrains.team/p/kt/reviews/16358/timeline (cherry picked from commit 7734235f2af26e8662b9870b3a26a90ace4b0c13)
diff --git a/compiler/resolution.common/src/org/jetbrains/kotlin/resolve/calls/mpp/AbstractExpectActualChecker.kt b/compiler/resolution.common/src/org/jetbrains/kotlin/resolve/calls/mpp/AbstractExpectActualChecker.kt index bbf7e9f..baaa75a 100644 --- a/compiler/resolution.common/src/org/jetbrains/kotlin/resolve/calls/mpp/AbstractExpectActualChecker.kt +++ b/compiler/resolution.common/src/org/jetbrains/kotlin/resolve/calls/mpp/AbstractExpectActualChecker.kt
@@ -183,7 +183,8 @@ val actualMembersByName = actualClassSymbol.collectAllMembers(isActualDeclaration = true).groupBy { nameOf(it) } val expectMembers = expectClassSymbol.collectAllMembers(isActualDeclaration = false) - .filterNot { it is CallableSymbolMarker && it.visibility == Visibilities.Private } + // private expect constructors are yet allowed KT-68688 + .filterNot { it is CallableSymbolMarker && it !is ConstructorSymbolMarker && it.visibility == Visibilities.Private } for (expectMember in expectMembers) { val actualMembers = getPossibleActualsByExpectName(expectMember, actualMembersByName)
diff --git a/compiler/testData/codegen/box/multiplatform/k2/privateConstructorWithDefaults.kt b/compiler/testData/codegen/box/multiplatform/k2/privateConstructorWithDefaults.kt index 164fed9..6174483 100644 --- a/compiler/testData/codegen/box/multiplatform/k2/privateConstructorWithDefaults.kt +++ b/compiler/testData/codegen/box/multiplatform/k2/privateConstructorWithDefaults.kt
@@ -1,4 +1,5 @@ -// IGNORE_BACKEND: ANY +// IGNORE_BACKEND: WASM +// Ignore wasm because KT-68828 // LANGUAGE: +MultiPlatformProjects // ISSUE: KT-68798