Migration to expect/actual: renames in DeclarationResolver

This commit is contained in:
Mikhail Glukhikh
2017-09-15 13:30:21 +03:00
parent afdd647df1
commit fc4ff3b760
@@ -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