[ObjCExport] Fix KT-64952 HasErrorTypesTest
This commit is contained in:
committed by
Space Team
parent
fc584b7c33
commit
2708c74d9c
+7
@@ -20,6 +20,13 @@ import org.jetbrains.kotlin.resolve.deprecation.DeprecationLevelValue
|
||||
import kotlin.contracts.ExperimentalContracts
|
||||
import kotlin.contracts.contract
|
||||
|
||||
context(KtAnalysisSession)
|
||||
internal fun KtSymbol.isVisibleInObjC(): Boolean = when(this) {
|
||||
is KtCallableSymbol -> this.isVisibleInObjC()
|
||||
is KtClassOrObjectSymbol -> this.isVisibleInObjC()
|
||||
else -> false
|
||||
}
|
||||
|
||||
context(KtAnalysisSession)
|
||||
internal fun KtCallableSymbol.isVisibleInObjC(): Boolean {
|
||||
if (this is KtSymbolWithVisibility && !isPublicApi(this)) return false
|
||||
|
||||
+1
-3
@@ -8,7 +8,6 @@ internal fun KtClassOrObjectSymbol.getAllMembers(): List<KtSymbol> {
|
||||
return getMemberScope()
|
||||
.getAllSymbols()
|
||||
.sortedBy { sortMembers(it) }
|
||||
.filterIsInstance<KtCallableSymbol>()
|
||||
.filter { member -> member.isVisibleInObjC() }
|
||||
.toList()
|
||||
}
|
||||
@@ -37,9 +36,8 @@ internal fun KtClassOrObjectSymbol.getDeclaredMembers(): List<KtSymbol> {
|
||||
return getDeclaredMemberScope()
|
||||
.getAllSymbols()
|
||||
.sortedBy { sortMembers(it) }
|
||||
.filterIsInstance<KtCallableSymbol>()
|
||||
.filter { member ->
|
||||
member.getAllOverriddenSymbols().isEmpty() && member.isVisibleInObjC()
|
||||
member.isVisibleInObjC() && (member !is KtCallableSymbol || member.getAllOverriddenSymbols().isEmpty())
|
||||
}
|
||||
.toList()
|
||||
}
|
||||
|
||||
+1
-1
@@ -87,7 +87,7 @@ class HasErrorTypesTest(
|
||||
"""
|
||||
class A {
|
||||
class B {
|
||||
val e = error("error")
|
||||
val e: Unresolved get() = error("stub")
|
||||
}
|
||||
}
|
||||
""".trimIndent()
|
||||
|
||||
Reference in New Issue
Block a user