diff --git a/compiler/frontend/src/org/jetbrains/kotlin/resolve/DeclarationResolver.kt b/compiler/frontend/src/org/jetbrains/kotlin/resolve/DeclarationResolver.kt index 94a93a3cb01..374b0b0450b 100644 --- a/compiler/frontend/src/org/jetbrains/kotlin/resolve/DeclarationResolver.kt +++ b/compiler/frontend/src/org/jetbrains/kotlin/resolve/DeclarationResolver.kt @@ -78,12 +78,12 @@ class DeclarationResolver( for ((fqName, declarationsOrPackageDirectives) in topLevelFqNames.asMap()) { if (fqName.isRoot) continue - // TODO: report error on header class and impl val, or vice versa - val (header, impl) = + // TODO: report error on expected class and actual val, or vice versa + val (expected, actual) = getTopLevelDescriptorsByFqName(topLevelDescriptorProvider, fqName, NoLookupLocation.WHEN_CHECK_DECLARATION_CONFLICTS) .partition { it is MemberDescriptor && it.isExpect } - for (descriptors in listOf(header, impl)) { + for (descriptors in listOf(expected, actual)) { if (descriptors.size > 1) { for (directive in declarationsOrPackageDirectives) { val reportAt = (directive as? KtPackageDirective)?.nameIdentifier ?: directive