From 35839695f7be591936af86c59dbe65e5be4a07b2 Mon Sep 17 00:00:00 2001 From: Ilya Gorbunov Date: Tue, 20 Sep 2016 22:06:22 +0300 Subject: [PATCH] Fix decompiled text consistency test to handle type aliases in JS. by Alexey Andreev --- .../decompiler/textBuilder/TextConsistencyBaseTest.kt | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/idea/tests/org/jetbrains/kotlin/idea/decompiler/textBuilder/TextConsistencyBaseTest.kt b/idea/tests/org/jetbrains/kotlin/idea/decompiler/textBuilder/TextConsistencyBaseTest.kt index c39c6a35a3c..a68ec6eeeba 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/decompiler/textBuilder/TextConsistencyBaseTest.kt +++ b/idea/tests/org/jetbrains/kotlin/idea/decompiler/textBuilder/TextConsistencyBaseTest.kt @@ -17,11 +17,8 @@ package org.jetbrains.kotlin.idea.decompiler.textBuilder import com.intellij.openapi.vfs.VirtualFile +import org.jetbrains.kotlin.descriptors.* import org.jetbrains.kotlin.fileClasses.OldPackageFacadeClassUtils -import org.jetbrains.kotlin.descriptors.CallableMemberDescriptor -import org.jetbrains.kotlin.descriptors.ClassDescriptor -import org.jetbrains.kotlin.descriptors.DeclarationDescriptor -import org.jetbrains.kotlin.descriptors.ModuleDescriptor import org.jetbrains.kotlin.idea.test.KotlinLightCodeInsightFixtureTestCase import org.jetbrains.kotlin.incremental.components.NoLookupLocation import org.jetbrains.kotlin.load.kotlin.VirtualFileFinder @@ -79,9 +76,8 @@ abstract class TextConsistencyBaseTest : KotlinLightCodeInsightFixtureTestCase() override fun resolveDeclarationsInFacade(facadeFqName: FqName): List = module.getPackage(facadeFqName.parent()).memberScope.getContributedDescriptors().filter { - it is CallableMemberDescriptor && - it.module != module.builtIns.builtInsModule && - isFromFacade(it, facadeFqName) + (it is CallableMemberDescriptor && isFromFacade(it, facadeFqName) || it is TypeAliasDescriptor) && + it.module != module.builtIns.builtInsModule }.sortedWith(MemberComparator.INSTANCE) } }