Add constructors to KtScope
- KtClassLikeSymbol.primaryConstructor was removed - Constructors were removed from getCallableMembers because constructors has no name (or special name `<init>`) and previous implementation was incorrect - KtScope.getAllSymbols returns constructors as before. Before it was like this because of the incorrect implementation of getCallableMembers - getConstructors has sence only for class scope, for the rest cases it is empty
This commit is contained in:
@@ -0,0 +1,12 @@
|
|||||||
|
public final class Constructors /* Constructors*/ {
|
||||||
|
private final int valInPrimary;
|
||||||
|
|
||||||
|
private Constructors();// .ctor()
|
||||||
|
|
||||||
|
public Constructors(@org.jetbrains.annotations.NotNull() java.lang.String);// .ctor(java.lang.String)
|
||||||
|
|
||||||
|
public Constructors(int);// .ctor(int)
|
||||||
|
|
||||||
|
public final int getValInPrimary();// getValInPrimary()
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
// Constructors
|
||||||
|
|
||||||
|
class Constructors(val valInPrimary: Int) {
|
||||||
|
constructor(parameterInSecondary: String): this(4)
|
||||||
|
private constructor(): this(2)
|
||||||
|
}
|
||||||
|
|
||||||
|
// LAZINESS:NoLaziness
|
||||||
|
// FIR_COMPARISON
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
public final class OnlySecondaryConstructors /* OnlySecondaryConstructors*/ {
|
||||||
|
public OnlySecondaryConstructors();// .ctor()
|
||||||
|
|
||||||
|
public OnlySecondaryConstructors(int);// .ctor(int)
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
// OnlySecondaryConstructors
|
||||||
|
|
||||||
|
class OnlySecondaryConstructors {
|
||||||
|
constructor(): super()
|
||||||
|
constructor(p: Int): this()
|
||||||
|
}
|
||||||
|
|
||||||
|
// LAZINESS:NoLaziness
|
||||||
|
// FIR_COMPARISON
|
||||||
+10
@@ -49,6 +49,11 @@ public class CompilerLightClassTestGenerated extends AbstractCompilerLightClassT
|
|||||||
runTest("compiler/testData/asJava/lightClasses/AnnotationClass.kt");
|
runTest("compiler/testData/asJava/lightClasses/AnnotationClass.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("Constructors.kt")
|
||||||
|
public void testConstructors() throws Exception {
|
||||||
|
runTest("compiler/testData/asJava/lightClasses/Constructors.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("DataClassWithCustomImplementedMembers.kt")
|
@TestMetadata("DataClassWithCustomImplementedMembers.kt")
|
||||||
public void testDataClassWithCustomImplementedMembers() throws Exception {
|
public void testDataClassWithCustomImplementedMembers() throws Exception {
|
||||||
runTest("compiler/testData/asJava/lightClasses/DataClassWithCustomImplementedMembers.kt");
|
runTest("compiler/testData/asJava/lightClasses/DataClassWithCustomImplementedMembers.kt");
|
||||||
@@ -129,6 +134,11 @@ public class CompilerLightClassTestGenerated extends AbstractCompilerLightClassT
|
|||||||
runTest("compiler/testData/asJava/lightClasses/NonDataClassWithComponentFunctions.kt");
|
runTest("compiler/testData/asJava/lightClasses/NonDataClassWithComponentFunctions.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("OnlySecondaryConstructors.kt")
|
||||||
|
public void testOnlySecondaryConstructors() throws Exception {
|
||||||
|
runTest("compiler/testData/asJava/lightClasses/OnlySecondaryConstructors.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("PublishedApi.kt")
|
@TestMetadata("PublishedApi.kt")
|
||||||
public void testPublishedApi() throws Exception {
|
public void testPublishedApi() throws Exception {
|
||||||
runTest("compiler/testData/asJava/lightClasses/PublishedApi.kt");
|
runTest("compiler/testData/asJava/lightClasses/PublishedApi.kt");
|
||||||
|
|||||||
+10
@@ -49,6 +49,11 @@ public class FirLightClassTestGenerated extends AbstractFirLightClassTest {
|
|||||||
runTest("compiler/testData/asJava/lightClasses/AnnotationClass.kt");
|
runTest("compiler/testData/asJava/lightClasses/AnnotationClass.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("Constructors.kt")
|
||||||
|
public void testConstructors() throws Exception {
|
||||||
|
runTest("compiler/testData/asJava/lightClasses/Constructors.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("DataClassWithCustomImplementedMembers.kt")
|
@TestMetadata("DataClassWithCustomImplementedMembers.kt")
|
||||||
public void testDataClassWithCustomImplementedMembers() throws Exception {
|
public void testDataClassWithCustomImplementedMembers() throws Exception {
|
||||||
runTest("compiler/testData/asJava/lightClasses/DataClassWithCustomImplementedMembers.kt");
|
runTest("compiler/testData/asJava/lightClasses/DataClassWithCustomImplementedMembers.kt");
|
||||||
@@ -129,6 +134,11 @@ public class FirLightClassTestGenerated extends AbstractFirLightClassTest {
|
|||||||
runTest("compiler/testData/asJava/lightClasses/NonDataClassWithComponentFunctions.kt");
|
runTest("compiler/testData/asJava/lightClasses/NonDataClassWithComponentFunctions.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("OnlySecondaryConstructors.kt")
|
||||||
|
public void testOnlySecondaryConstructors() throws Exception {
|
||||||
|
runTest("compiler/testData/asJava/lightClasses/OnlySecondaryConstructors.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("PublishedApi.kt")
|
@TestMetadata("PublishedApi.kt")
|
||||||
public void testPublishedApi() throws Exception {
|
public void testPublishedApi() throws Exception {
|
||||||
runTest("compiler/testData/asJava/lightClasses/PublishedApi.kt");
|
runTest("compiler/testData/asJava/lightClasses/PublishedApi.kt");
|
||||||
|
|||||||
@@ -26,11 +26,13 @@ interface KtScope : ValidityTokenOwner {
|
|||||||
sequence {
|
sequence {
|
||||||
yieldAll(getCallableSymbols())
|
yieldAll(getCallableSymbols())
|
||||||
yieldAll(getClassifierSymbols())
|
yieldAll(getClassifierSymbols())
|
||||||
|
yieldAll(getConstructors())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fun getCallableSymbols(nameFilter: KtScopeNameFilter = { true }): Sequence<KtCallableSymbol>
|
fun getCallableSymbols(nameFilter: KtScopeNameFilter = { true }): Sequence<KtCallableSymbol>
|
||||||
fun getClassifierSymbols(nameFilter: KtScopeNameFilter = { true }): Sequence<KtClassifierSymbol>
|
fun getClassifierSymbols(nameFilter: KtScopeNameFilter = { true }): Sequence<KtClassifierSymbol>
|
||||||
|
fun getConstructors(): Sequence<KtConstructorSymbol>
|
||||||
|
|
||||||
fun containsName(name: Name): Boolean = withValidityAssertion {
|
fun containsName(name: Name): Boolean = withValidityAssertion {
|
||||||
name in getCallableNames() || name in getClassifierNames()
|
name in getCallableNames() || name in getClassifierNames()
|
||||||
|
|||||||
-2
@@ -54,8 +54,6 @@ abstract class KtClassOrObjectSymbol : KtClassLikeSymbol(),
|
|||||||
|
|
||||||
abstract val superTypes: List<KtTypeAndAnnotations>
|
abstract val superTypes: List<KtTypeAndAnnotations>
|
||||||
|
|
||||||
abstract val primaryConstructor: KtConstructorSymbol?
|
|
||||||
|
|
||||||
abstract override fun createPointer(): KtSymbolPointer<KtClassOrObjectSymbol>
|
abstract override fun createPointer(): KtSymbolPointer<KtClassOrObjectSymbol>
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+5
-21
@@ -6,16 +6,10 @@
|
|||||||
package org.jetbrains.kotlin.idea.asJava
|
package org.jetbrains.kotlin.idea.asJava
|
||||||
|
|
||||||
import com.intellij.psi.*
|
import com.intellij.psi.*
|
||||||
import org.jetbrains.kotlin.asJava.builder.memberIndex
|
|
||||||
import org.jetbrains.kotlin.asJava.classes.METHOD_INDEX_BASE
|
|
||||||
import org.jetbrains.kotlin.asJava.classes.METHOD_INDEX_FOR_DEFAULT_CTOR
|
|
||||||
import org.jetbrains.kotlin.asJava.classes.lazyPub
|
import org.jetbrains.kotlin.asJava.classes.lazyPub
|
||||||
import org.jetbrains.kotlin.asJava.elements.KtLightField
|
import org.jetbrains.kotlin.asJava.elements.KtLightField
|
||||||
import org.jetbrains.kotlin.asJava.elements.KtLightMethod
|
import org.jetbrains.kotlin.asJava.elements.KtLightMethod
|
||||||
import org.jetbrains.kotlin.idea.asJava.classes.*
|
import org.jetbrains.kotlin.idea.asJava.classes.*
|
||||||
import org.jetbrains.kotlin.idea.asJava.classes.createInheritanceList
|
|
||||||
import org.jetbrains.kotlin.idea.asJava.classes.createInnerClasses
|
|
||||||
import org.jetbrains.kotlin.idea.asJava.classes.createMethods
|
|
||||||
import org.jetbrains.kotlin.idea.frontend.api.fir.analyzeWithSymbolAsContext
|
import org.jetbrains.kotlin.idea.frontend.api.fir.analyzeWithSymbolAsContext
|
||||||
import org.jetbrains.kotlin.idea.frontend.api.symbols.*
|
import org.jetbrains.kotlin.idea.frontend.api.symbols.*
|
||||||
import org.jetbrains.kotlin.idea.frontend.api.symbols.markers.KtSymbolKind
|
import org.jetbrains.kotlin.idea.frontend.api.symbols.markers.KtSymbolKind
|
||||||
@@ -91,8 +85,11 @@ internal class FirLightClassForSymbol(
|
|||||||
val result = mutableListOf<KtLightMethod>()
|
val result = mutableListOf<KtLightMethod>()
|
||||||
|
|
||||||
analyzeWithSymbolAsContext(classOrObjectSymbol) {
|
analyzeWithSymbolAsContext(classOrObjectSymbol) {
|
||||||
val callableSymbols = classOrObjectSymbol.getDeclaredMemberScope().getCallableSymbols()
|
val declaredMemberScope = classOrObjectSymbol.getDeclaredMemberScope()
|
||||||
val visibleDeclarations = callableSymbols.applyIf(isEnum) {
|
|
||||||
|
createConstructors(declaredMemberScope.getConstructors(), result)
|
||||||
|
|
||||||
|
val visibleDeclarations = declaredMemberScope.getCallableSymbols().applyIf(isEnum) {
|
||||||
filterNot { function ->
|
filterNot { function ->
|
||||||
function is KtFunctionSymbol && function.name.asString().let { it == "values" || it == "valueOf" }
|
function is KtFunctionSymbol && function.name.asString().let { it == "values" || it == "valueOf" }
|
||||||
}
|
}
|
||||||
@@ -106,19 +103,6 @@ internal class FirLightClassForSymbol(
|
|||||||
createMethods(visibleDeclarations, result, suppressStaticForMethods = suppressStatic)
|
createMethods(visibleDeclarations, result, suppressStaticForMethods = suppressStatic)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (result.none { it.isConstructor }) {
|
|
||||||
classOrObjectSymbol.primaryConstructor?.let {
|
|
||||||
result.add(
|
|
||||||
FirLightConstructorForSymbol(
|
|
||||||
constructorSymbol = it,
|
|
||||||
lightMemberOrigin = null,
|
|
||||||
containingClass = this,
|
|
||||||
methodIndex = METHOD_INDEX_FOR_DEFAULT_CTOR
|
|
||||||
)
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
addMethodsFromCompanionIfNeeded(result)
|
addMethodsFromCompanionIfNeeded(result)
|
||||||
|
|
||||||
result
|
result
|
||||||
|
|||||||
+18
-11
@@ -121,6 +121,23 @@ private fun lightClassForEnumEntry(ktEnumEntry: KtEnumEntry): KtLightClass? {
|
|||||||
return (targetField as? FirLightFieldForEnumEntry)?.initializingClass as? KtLightClass
|
return (targetField as? FirLightFieldForEnumEntry)?.initializingClass as? KtLightClass
|
||||||
}
|
}
|
||||||
|
|
||||||
|
internal fun FirLightClassForSymbol.createConstructors(
|
||||||
|
declarations: Sequence<KtConstructorSymbol>,
|
||||||
|
result: MutableList<KtLightMethod>
|
||||||
|
) {
|
||||||
|
for (declaration in declarations) {
|
||||||
|
if (declaration.isHiddenOrSynthetic()) continue
|
||||||
|
result.add(
|
||||||
|
FirLightConstructorForSymbol(
|
||||||
|
constructorSymbol = declaration,
|
||||||
|
lightMemberOrigin = null,
|
||||||
|
containingClass = this@createConstructors,
|
||||||
|
methodIndex = METHOD_INDEX_BASE
|
||||||
|
)
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
internal fun FirLightClassBase.createMethods(
|
internal fun FirLightClassBase.createMethods(
|
||||||
declarations: Sequence<KtCallableSymbol>,
|
declarations: Sequence<KtCallableSymbol>,
|
||||||
result: MutableList<KtLightMethod>,
|
result: MutableList<KtLightMethod>,
|
||||||
@@ -167,17 +184,6 @@ internal fun FirLightClassBase.createMethods(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
is KtConstructorSymbol -> {
|
|
||||||
if (declaration.isHiddenOrSynthetic()) continue
|
|
||||||
result.add(
|
|
||||||
FirLightConstructorForSymbol(
|
|
||||||
constructorSymbol = declaration,
|
|
||||||
lightMemberOrigin = null,
|
|
||||||
containingClass = this@createMethods,
|
|
||||||
methodIndex = METHOD_INDEX_BASE
|
|
||||||
)
|
|
||||||
)
|
|
||||||
}
|
|
||||||
is KtPropertySymbol -> {
|
is KtPropertySymbol -> {
|
||||||
|
|
||||||
if (declaration is KtKotlinPropertySymbol && declaration.isConst) continue
|
if (declaration is KtKotlinPropertySymbol && declaration.isConst) continue
|
||||||
@@ -229,6 +235,7 @@ internal fun FirLightClassBase.createMethods(
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
is KtConstructorSymbol -> error("Constructors should be handled separately and not passed to this function")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+7
@@ -12,6 +12,7 @@ import org.jetbrains.kotlin.idea.frontend.api.scopes.KtScope
|
|||||||
import org.jetbrains.kotlin.idea.frontend.api.scopes.KtScopeNameFilter
|
import org.jetbrains.kotlin.idea.frontend.api.scopes.KtScopeNameFilter
|
||||||
import org.jetbrains.kotlin.idea.frontend.api.symbols.KtCallableSymbol
|
import org.jetbrains.kotlin.idea.frontend.api.symbols.KtCallableSymbol
|
||||||
import org.jetbrains.kotlin.idea.frontend.api.symbols.KtClassifierSymbol
|
import org.jetbrains.kotlin.idea.frontend.api.symbols.KtClassifierSymbol
|
||||||
|
import org.jetbrains.kotlin.idea.frontend.api.symbols.KtConstructorSymbol
|
||||||
import org.jetbrains.kotlin.idea.frontend.api.symbols.KtSymbol
|
import org.jetbrains.kotlin.idea.frontend.api.symbols.KtSymbol
|
||||||
import org.jetbrains.kotlin.idea.frontend.api.withValidityAssertion
|
import org.jetbrains.kotlin.idea.frontend.api.withValidityAssertion
|
||||||
import org.jetbrains.kotlin.name.Name
|
import org.jetbrains.kotlin.name.Name
|
||||||
@@ -59,6 +60,12 @@ class KtFirCompositeScope(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override fun getConstructors(): Sequence<KtConstructorSymbol> = withValidityAssertion {
|
||||||
|
sequence {
|
||||||
|
subScopes.forEach { yieldAll(it.getConstructors()) }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
override fun containsName(name: Name): Boolean = withValidityAssertion {
|
override fun containsName(name: Name): Boolean = withValidityAssertion {
|
||||||
subScopes.any { it.containsName(name) }
|
subScopes.any { it.containsName(name) }
|
||||||
}
|
}
|
||||||
|
|||||||
+14
-9
@@ -17,6 +17,7 @@ import org.jetbrains.kotlin.idea.frontend.api.scopes.KtScope
|
|||||||
import org.jetbrains.kotlin.idea.frontend.api.scopes.KtScopeNameFilter
|
import org.jetbrains.kotlin.idea.frontend.api.scopes.KtScopeNameFilter
|
||||||
import org.jetbrains.kotlin.idea.frontend.api.symbols.KtCallableSymbol
|
import org.jetbrains.kotlin.idea.frontend.api.symbols.KtCallableSymbol
|
||||||
import org.jetbrains.kotlin.idea.frontend.api.symbols.KtClassifierSymbol
|
import org.jetbrains.kotlin.idea.frontend.api.symbols.KtClassifierSymbol
|
||||||
|
import org.jetbrains.kotlin.idea.frontend.api.symbols.KtConstructorSymbol
|
||||||
import org.jetbrains.kotlin.idea.frontend.api.withValidityAssertion
|
import org.jetbrains.kotlin.idea.frontend.api.withValidityAssertion
|
||||||
import org.jetbrains.kotlin.name.Name
|
import org.jetbrains.kotlin.name.Name
|
||||||
|
|
||||||
@@ -49,6 +50,10 @@ internal abstract class KtFirDelegatingScope<S>(
|
|||||||
firScope.getClassifierSymbols(getClassifierNames().filter(nameFilter), builder)
|
firScope.getClassifierSymbols(getClassifierNames().filter(nameFilter), builder)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override fun getConstructors(): Sequence<KtConstructorSymbol> = withValidityAssertion {
|
||||||
|
firScope.getConstructors(builder)
|
||||||
|
}
|
||||||
|
|
||||||
override fun containsName(name: Name): Boolean = withValidityAssertion {
|
override fun containsName(name: Name): Boolean = withValidityAssertion {
|
||||||
name in getAllNames()
|
name in getAllNames()
|
||||||
}
|
}
|
||||||
@@ -70,15 +75,6 @@ internal fun FirScope.getCallableSymbols(callableNames: Collection<Name>, builde
|
|||||||
}
|
}
|
||||||
callables.add(symbol)
|
callables.add(symbol)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (name.isSpecial && name.asString() == "<init>") {
|
|
||||||
processDeclaredConstructors { firConstructor ->
|
|
||||||
firConstructor.fir.let { fir ->
|
|
||||||
callables.add(builder.buildConstructorSymbol(fir))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
yieldAll(callables)
|
yieldAll(callables)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -93,3 +89,12 @@ internal fun FirScope.getClassifierSymbols(classLikeNames: Collection<Name>, bui
|
|||||||
yieldAll(classifierSymbols)
|
yieldAll(classifierSymbols)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
internal fun FirScope.getConstructors(builder: KtSymbolByFirBuilder): Sequence<KtConstructorSymbol> =
|
||||||
|
sequence {
|
||||||
|
val constructorSymbols = mutableListOf<KtConstructorSymbol>()
|
||||||
|
processDeclaredConstructors { firSymbol ->
|
||||||
|
constructorSymbols.add(builder.buildConstructorSymbol(firSymbol.fir))
|
||||||
|
}
|
||||||
|
yieldAll(constructorSymbols)
|
||||||
|
}
|
||||||
+4
@@ -12,6 +12,7 @@ import org.jetbrains.kotlin.idea.frontend.api.scopes.KtMemberScope
|
|||||||
import org.jetbrains.kotlin.idea.frontend.api.scopes.KtScopeNameFilter
|
import org.jetbrains.kotlin.idea.frontend.api.scopes.KtScopeNameFilter
|
||||||
import org.jetbrains.kotlin.idea.frontend.api.symbols.KtCallableSymbol
|
import org.jetbrains.kotlin.idea.frontend.api.symbols.KtCallableSymbol
|
||||||
import org.jetbrains.kotlin.idea.frontend.api.symbols.KtClassifierSymbol
|
import org.jetbrains.kotlin.idea.frontend.api.symbols.KtClassifierSymbol
|
||||||
|
import org.jetbrains.kotlin.idea.frontend.api.symbols.KtConstructorSymbol
|
||||||
import org.jetbrains.kotlin.idea.frontend.api.symbols.markers.KtSymbolWithMembers
|
import org.jetbrains.kotlin.idea.frontend.api.symbols.markers.KtSymbolWithMembers
|
||||||
import org.jetbrains.kotlin.name.Name
|
import org.jetbrains.kotlin.name.Name
|
||||||
|
|
||||||
@@ -26,6 +27,9 @@ internal class KtFirEmptyMemberScope(override val owner: KtSymbolWithMembers) :
|
|||||||
override fun getClassifierSymbols(nameFilter: KtScopeNameFilter): Sequence<KtClassifierSymbol> =
|
override fun getClassifierSymbols(nameFilter: KtScopeNameFilter): Sequence<KtClassifierSymbol> =
|
||||||
emptySequence()
|
emptySequence()
|
||||||
|
|
||||||
|
override fun getConstructors(): Sequence<KtConstructorSymbol> =
|
||||||
|
emptySequence()
|
||||||
|
|
||||||
override val token: ValidityToken
|
override val token: ValidityToken
|
||||||
get() = owner.token
|
get() = owner.token
|
||||||
}
|
}
|
||||||
+3
@@ -17,6 +17,7 @@ import org.jetbrains.kotlin.idea.frontend.api.scopes.KtDeclarationScope
|
|||||||
import org.jetbrains.kotlin.idea.frontend.api.scopes.KtScopeNameFilter
|
import org.jetbrains.kotlin.idea.frontend.api.scopes.KtScopeNameFilter
|
||||||
import org.jetbrains.kotlin.idea.frontend.api.symbols.KtCallableSymbol
|
import org.jetbrains.kotlin.idea.frontend.api.symbols.KtCallableSymbol
|
||||||
import org.jetbrains.kotlin.idea.frontend.api.symbols.KtClassifierSymbol
|
import org.jetbrains.kotlin.idea.frontend.api.symbols.KtClassifierSymbol
|
||||||
|
import org.jetbrains.kotlin.idea.frontend.api.symbols.KtConstructorSymbol
|
||||||
import org.jetbrains.kotlin.idea.frontend.api.symbols.markers.KtSymbolWithDeclarations
|
import org.jetbrains.kotlin.idea.frontend.api.symbols.markers.KtSymbolWithDeclarations
|
||||||
import org.jetbrains.kotlin.idea.frontend.api.withValidityAssertion
|
import org.jetbrains.kotlin.idea.frontend.api.withValidityAssertion
|
||||||
import org.jetbrains.kotlin.name.Name
|
import org.jetbrains.kotlin.name.Name
|
||||||
@@ -92,4 +93,6 @@ internal class KtFirFileScope(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override fun getConstructors(): Sequence<KtConstructorSymbol> = emptySequence()
|
||||||
}
|
}
|
||||||
+2
@@ -17,6 +17,7 @@ import org.jetbrains.kotlin.idea.frontend.api.scopes.KtScopeNameFilter
|
|||||||
import org.jetbrains.kotlin.idea.frontend.api.scopes.NonStarImport
|
import org.jetbrains.kotlin.idea.frontend.api.scopes.NonStarImport
|
||||||
import org.jetbrains.kotlin.idea.frontend.api.symbols.KtCallableSymbol
|
import org.jetbrains.kotlin.idea.frontend.api.symbols.KtCallableSymbol
|
||||||
import org.jetbrains.kotlin.idea.frontend.api.symbols.KtClassifierSymbol
|
import org.jetbrains.kotlin.idea.frontend.api.symbols.KtClassifierSymbol
|
||||||
|
import org.jetbrains.kotlin.idea.frontend.api.symbols.KtConstructorSymbol
|
||||||
import org.jetbrains.kotlin.idea.frontend.api.withValidityAssertion
|
import org.jetbrains.kotlin.idea.frontend.api.withValidityAssertion
|
||||||
import org.jetbrains.kotlin.name.Name
|
import org.jetbrains.kotlin.name.Name
|
||||||
|
|
||||||
@@ -51,6 +52,7 @@ internal class KtFirNonStarImportingScope(
|
|||||||
firScope.getClassifierSymbols(getClassifierNames().filter(nameFilter), builder)
|
firScope.getClassifierSymbols(getClassifierNames().filter(nameFilter), builder)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override fun getConstructors(): Sequence<KtConstructorSymbol> = emptySequence()
|
||||||
|
|
||||||
override fun getCallableNames(): Set<Name> = withValidityAssertion {
|
override fun getCallableNames(): Set<Name> = withValidityAssertion {
|
||||||
imports.mapNotNullTo(hashSetOf()) { it.callableName }
|
imports.mapNotNullTo(hashSetOf()) { it.callableName }
|
||||||
|
|||||||
+3
@@ -15,6 +15,7 @@ import org.jetbrains.kotlin.idea.frontend.api.scopes.KtPackageScope
|
|||||||
import org.jetbrains.kotlin.idea.frontend.api.scopes.KtScopeNameFilter
|
import org.jetbrains.kotlin.idea.frontend.api.scopes.KtScopeNameFilter
|
||||||
import org.jetbrains.kotlin.idea.frontend.api.symbols.KtCallableSymbol
|
import org.jetbrains.kotlin.idea.frontend.api.symbols.KtCallableSymbol
|
||||||
import org.jetbrains.kotlin.idea.frontend.api.symbols.KtClassifierSymbol
|
import org.jetbrains.kotlin.idea.frontend.api.symbols.KtClassifierSymbol
|
||||||
|
import org.jetbrains.kotlin.idea.frontend.api.symbols.KtConstructorSymbol
|
||||||
import org.jetbrains.kotlin.idea.frontend.api.withValidityAssertion
|
import org.jetbrains.kotlin.idea.frontend.api.withValidityAssertion
|
||||||
import org.jetbrains.kotlin.idea.stubindex.KotlinTopLevelClassByPackageIndex
|
import org.jetbrains.kotlin.idea.stubindex.KotlinTopLevelClassByPackageIndex
|
||||||
import org.jetbrains.kotlin.idea.stubindex.KotlinTopLevelFunctionByPackageIndex
|
import org.jetbrains.kotlin.idea.stubindex.KotlinTopLevelFunctionByPackageIndex
|
||||||
@@ -52,4 +53,6 @@ internal class KtFirPackageScope(
|
|||||||
override fun getClassifierSymbols(nameFilter: KtScopeNameFilter): Sequence<KtClassifierSymbol> = withValidityAssertion {
|
override fun getClassifierSymbols(nameFilter: KtScopeNameFilter): Sequence<KtClassifierSymbol> = withValidityAssertion {
|
||||||
firScope.getClassifierSymbols(getClassifierNames().filter(nameFilter), builder)
|
firScope.getClassifierSymbols(getClassifierNames().filter(nameFilter), builder)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override fun getConstructors(): Sequence<KtConstructorSymbol> = emptySequence()
|
||||||
}
|
}
|
||||||
|
|||||||
+3
@@ -19,6 +19,7 @@ import org.jetbrains.kotlin.idea.frontend.api.fir.utils.weakRef
|
|||||||
import org.jetbrains.kotlin.idea.frontend.api.scopes.*
|
import org.jetbrains.kotlin.idea.frontend.api.scopes.*
|
||||||
import org.jetbrains.kotlin.idea.frontend.api.symbols.KtCallableSymbol
|
import org.jetbrains.kotlin.idea.frontend.api.symbols.KtCallableSymbol
|
||||||
import org.jetbrains.kotlin.idea.frontend.api.symbols.KtClassifierSymbol
|
import org.jetbrains.kotlin.idea.frontend.api.symbols.KtClassifierSymbol
|
||||||
|
import org.jetbrains.kotlin.idea.frontend.api.symbols.KtConstructorSymbol
|
||||||
import org.jetbrains.kotlin.idea.frontend.api.withValidityAssertion
|
import org.jetbrains.kotlin.idea.frontend.api.withValidityAssertion
|
||||||
import org.jetbrains.kotlin.idea.stubindex.KotlinTopLevelClassByPackageIndex
|
import org.jetbrains.kotlin.idea.stubindex.KotlinTopLevelClassByPackageIndex
|
||||||
import org.jetbrains.kotlin.idea.stubindex.KotlinTopLevelFunctionByPackageIndex
|
import org.jetbrains.kotlin.idea.stubindex.KotlinTopLevelFunctionByPackageIndex
|
||||||
@@ -56,6 +57,8 @@ internal class KtFirStarImportingScope(
|
|||||||
firScope.getClassifierSymbols(getClassifierNames().filter(nameFilter), builder)
|
firScope.getClassifierSymbols(getClassifierNames().filter(nameFilter), builder)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override fun getConstructors(): Sequence<KtConstructorSymbol> = emptySequence()
|
||||||
|
|
||||||
// todo cache?
|
// todo cache?
|
||||||
@OptIn(ExperimentalStdlibApi::class)
|
@OptIn(ExperimentalStdlibApi::class)
|
||||||
override fun getCallableNames(): Set<Name> = withValidityAssertion {
|
override fun getCallableNames(): Set<Name> = withValidityAssertion {
|
||||||
|
|||||||
-5
@@ -17,7 +17,6 @@ import org.jetbrains.kotlin.idea.frontend.api.fir.utils.cached
|
|||||||
import org.jetbrains.kotlin.idea.frontend.api.fir.utils.firRef
|
import org.jetbrains.kotlin.idea.frontend.api.fir.utils.firRef
|
||||||
import org.jetbrains.kotlin.idea.frontend.api.symbols.KtClassKind
|
import org.jetbrains.kotlin.idea.frontend.api.symbols.KtClassKind
|
||||||
import org.jetbrains.kotlin.idea.frontend.api.symbols.KtClassOrObjectSymbol
|
import org.jetbrains.kotlin.idea.frontend.api.symbols.KtClassOrObjectSymbol
|
||||||
import org.jetbrains.kotlin.idea.frontend.api.symbols.KtConstructorSymbol
|
|
||||||
import org.jetbrains.kotlin.idea.frontend.api.symbols.markers.*
|
import org.jetbrains.kotlin.idea.frontend.api.symbols.markers.*
|
||||||
import org.jetbrains.kotlin.idea.frontend.api.symbols.pointers.CanNotCreateSymbolPointerForLocalLibraryDeclarationException
|
import org.jetbrains.kotlin.idea.frontend.api.symbols.pointers.CanNotCreateSymbolPointerForLocalLibraryDeclarationException
|
||||||
import org.jetbrains.kotlin.idea.frontend.api.symbols.pointers.KtPsiBasedSymbolPointer
|
import org.jetbrains.kotlin.idea.frontend.api.symbols.pointers.KtPsiBasedSymbolPointer
|
||||||
@@ -62,10 +61,6 @@ internal class KtFirClassOrObjectSymbol(
|
|||||||
firRef.superTypesAndAnnotationsList(builder)
|
firRef.superTypesAndAnnotationsList(builder)
|
||||||
}
|
}
|
||||||
|
|
||||||
override val primaryConstructor: KtConstructorSymbol? by firRef.withFirAndCache(FirResolvePhase.RAW_FIR) { fir ->
|
|
||||||
fir.getPrimaryConstructorIfAny()?.let { builder.buildConstructorSymbol(it) }
|
|
||||||
}
|
|
||||||
|
|
||||||
override val typeParameters by firRef.withFirAndCache { fir ->
|
override val typeParameters by firRef.withFirAndCache { fir ->
|
||||||
fir.typeParameters.map { typeParameter ->
|
fir.typeParameters.map { typeParameter ->
|
||||||
builder.buildTypeParameterSymbol(typeParameter.symbol.fir)
|
builder.buildTypeParameterSymbol(typeParameter.symbol.fir)
|
||||||
|
|||||||
@@ -67,7 +67,6 @@ KtFirClassOrObjectSymbol:
|
|||||||
modality: FINAL
|
modality: FINAL
|
||||||
name: C
|
name: C
|
||||||
origin: SOURCE
|
origin: SOURCE
|
||||||
primaryConstructor: KtFirConstructorSymbol(<constructor>)
|
|
||||||
superTypes: [[] kotlin/Any]
|
superTypes: [[] kotlin/Any]
|
||||||
symbolKind: TOP_LEVEL
|
symbolKind: TOP_LEVEL
|
||||||
typeParameters: []
|
typeParameters: []
|
||||||
@@ -86,7 +85,6 @@ KtFirClassOrObjectSymbol:
|
|||||||
modality: ABSTRACT
|
modality: ABSTRACT
|
||||||
name: I
|
name: I
|
||||||
origin: SOURCE
|
origin: SOURCE
|
||||||
primaryConstructor: null
|
|
||||||
superTypes: [[] kotlin/Any]
|
superTypes: [[] kotlin/Any]
|
||||||
symbolKind: TOP_LEVEL
|
symbolKind: TOP_LEVEL
|
||||||
typeParameters: []
|
typeParameters: []
|
||||||
|
|||||||
+12
-13
@@ -1161,18 +1161,6 @@ KtFirFunctionSymbol:
|
|||||||
valueParameters: [KtFirFunctionValueParameterSymbol(other)]
|
valueParameters: [KtFirFunctionValueParameterSymbol(other)]
|
||||||
visibility: PUBLIC
|
visibility: PUBLIC
|
||||||
|
|
||||||
KtFirConstructorSymbol:
|
|
||||||
annotatedType: [] kotlin/Int
|
|
||||||
annotations: []
|
|
||||||
containingClassIdIfNonLocal: kotlin/Int
|
|
||||||
dispatchType: null
|
|
||||||
isPrimary: true
|
|
||||||
origin: LIBRARY
|
|
||||||
symbolKind: MEMBER
|
|
||||||
typeParameters: []
|
|
||||||
valueParameters: []
|
|
||||||
visibility: PRIVATE
|
|
||||||
|
|
||||||
KtFirFunctionSymbol:
|
KtFirFunctionSymbol:
|
||||||
annotatedType: [] kotlin/Boolean
|
annotatedType: [] kotlin/Boolean
|
||||||
annotations: []
|
annotations: []
|
||||||
@@ -1246,8 +1234,19 @@ KtFirClassOrObjectSymbol:
|
|||||||
modality: FINAL
|
modality: FINAL
|
||||||
name: Companion
|
name: Companion
|
||||||
origin: LIBRARY
|
origin: LIBRARY
|
||||||
primaryConstructor: KtFirConstructorSymbol(<constructor>)
|
|
||||||
superTypes: [[] kotlin/Any]
|
superTypes: [[] kotlin/Any]
|
||||||
symbolKind: MEMBER
|
symbolKind: MEMBER
|
||||||
typeParameters: []
|
typeParameters: []
|
||||||
visibility: PUBLIC
|
visibility: PUBLIC
|
||||||
|
|
||||||
|
KtFirConstructorSymbol:
|
||||||
|
annotatedType: [] kotlin/Int
|
||||||
|
annotations: []
|
||||||
|
containingClassIdIfNonLocal: kotlin/Int
|
||||||
|
dispatchType: null
|
||||||
|
isPrimary: true
|
||||||
|
origin: LIBRARY
|
||||||
|
symbolKind: MEMBER
|
||||||
|
typeParameters: []
|
||||||
|
valueParameters: []
|
||||||
|
visibility: PRIVATE
|
||||||
|
|||||||
@@ -1174,6 +1174,44 @@ KtFirFunctionSymbol:
|
|||||||
valueParameters: []
|
valueParameters: []
|
||||||
visibility: PUBLIC
|
visibility: PUBLIC
|
||||||
|
|
||||||
|
KtFirFunctionSymbol:
|
||||||
|
annotatedType: [] kotlin/Char
|
||||||
|
annotations: []
|
||||||
|
callableIdIfNonLocal: kotlin.CharSequence.get
|
||||||
|
dispatchType: kotlin/CharSequence
|
||||||
|
isExtension: false
|
||||||
|
isExternal: false
|
||||||
|
isInline: false
|
||||||
|
isOperator: true
|
||||||
|
isOverride: false
|
||||||
|
isSuspend: false
|
||||||
|
modality: ABSTRACT
|
||||||
|
name: get
|
||||||
|
origin: LIBRARY
|
||||||
|
receiverType: null
|
||||||
|
symbolKind: MEMBER
|
||||||
|
typeParameters: []
|
||||||
|
valueParameters: [KtFirFunctionValueParameterSymbol(index)]
|
||||||
|
visibility: PUBLIC
|
||||||
|
|
||||||
|
KtFirClassOrObjectSymbol:
|
||||||
|
annotations: []
|
||||||
|
classIdIfNonLocal: java/lang/String.CaseInsensitiveComparator
|
||||||
|
classKind: CLASS
|
||||||
|
companionObject: null
|
||||||
|
isData: false
|
||||||
|
isExternal: false
|
||||||
|
isFun: false
|
||||||
|
isInline: false
|
||||||
|
isInner: false
|
||||||
|
modality: OPEN
|
||||||
|
name: CaseInsensitiveComparator
|
||||||
|
origin: JAVA
|
||||||
|
superTypes: [[] kotlin/Any, [] java/util/Comparator<ft<@FlexibleNullability kotlin/String, kotlin/String?>!>, [] java/io/Serializable]
|
||||||
|
symbolKind: MEMBER
|
||||||
|
typeParameters: []
|
||||||
|
visibility: PRIVATE
|
||||||
|
|
||||||
KtFirConstructorSymbol:
|
KtFirConstructorSymbol:
|
||||||
annotatedType: [] java/lang/String
|
annotatedType: [] java/lang/String
|
||||||
annotations: []
|
annotations: []
|
||||||
@@ -1377,42 +1415,3 @@ KtFirConstructorSymbol:
|
|||||||
typeParameters: []
|
typeParameters: []
|
||||||
valueParameters: [KtFirConstructorValueParameterSymbol(offset), KtFirConstructorValueParameterSymbol(count), KtFirConstructorValueParameterSymbol(value)]
|
valueParameters: [KtFirConstructorValueParameterSymbol(offset), KtFirConstructorValueParameterSymbol(count), KtFirConstructorValueParameterSymbol(value)]
|
||||||
visibility: UNKNOWN
|
visibility: UNKNOWN
|
||||||
|
|
||||||
KtFirFunctionSymbol:
|
|
||||||
annotatedType: [] kotlin/Char
|
|
||||||
annotations: []
|
|
||||||
callableIdIfNonLocal: kotlin.CharSequence.get
|
|
||||||
dispatchType: kotlin/CharSequence
|
|
||||||
isExtension: false
|
|
||||||
isExternal: false
|
|
||||||
isInline: false
|
|
||||||
isOperator: true
|
|
||||||
isOverride: false
|
|
||||||
isSuspend: false
|
|
||||||
modality: ABSTRACT
|
|
||||||
name: get
|
|
||||||
origin: LIBRARY
|
|
||||||
receiverType: null
|
|
||||||
symbolKind: MEMBER
|
|
||||||
typeParameters: []
|
|
||||||
valueParameters: [KtFirFunctionValueParameterSymbol(index)]
|
|
||||||
visibility: PUBLIC
|
|
||||||
|
|
||||||
KtFirClassOrObjectSymbol:
|
|
||||||
annotations: []
|
|
||||||
classIdIfNonLocal: java/lang/String.CaseInsensitiveComparator
|
|
||||||
classKind: CLASS
|
|
||||||
companionObject: null
|
|
||||||
isData: false
|
|
||||||
isExternal: false
|
|
||||||
isFun: false
|
|
||||||
isInline: false
|
|
||||||
isInner: false
|
|
||||||
modality: OPEN
|
|
||||||
name: CaseInsensitiveComparator
|
|
||||||
origin: JAVA
|
|
||||||
primaryConstructor: null
|
|
||||||
superTypes: [[] kotlin/Any, [] java/util/Comparator<ft<@FlexibleNullability kotlin/String, kotlin/String?>!>, [] java/io/Serializable]
|
|
||||||
symbolKind: MEMBER
|
|
||||||
typeParameters: []
|
|
||||||
visibility: PRIVATE
|
|
||||||
|
|||||||
@@ -16,7 +16,6 @@ KtFirClassOrObjectSymbol:
|
|||||||
modality: ABSTRACT
|
modality: ABSTRACT
|
||||||
name: Lazy
|
name: Lazy
|
||||||
origin: LIBRARY
|
origin: LIBRARY
|
||||||
primaryConstructor: null
|
|
||||||
superTypes: [[] kotlin/Any]
|
superTypes: [[] kotlin/Any]
|
||||||
symbolKind: TOP_LEVEL
|
symbolKind: TOP_LEVEL
|
||||||
typeParameters: [KtFirTypeParameterSymbol(T)]
|
typeParameters: [KtFirTypeParameterSymbol(T)]
|
||||||
|
|||||||
@@ -16,7 +16,6 @@ KtFirClassOrObjectSymbol:
|
|||||||
modality: FINAL
|
modality: FINAL
|
||||||
name: String
|
name: String
|
||||||
origin: JAVA
|
origin: JAVA
|
||||||
primaryConstructor: null
|
|
||||||
superTypes: [[] kotlin/Any, [] java/io/Serializable, [] kotlin/Comparable<ft<@FlexibleNullability kotlin/String, kotlin/String?>!>, [] kotlin/CharSequence]
|
superTypes: [[] kotlin/Any, [] java/io/Serializable, [] kotlin/Comparable<ft<@FlexibleNullability kotlin/String, kotlin/String?>!>, [] kotlin/CharSequence]
|
||||||
symbolKind: TOP_LEVEL
|
symbolKind: TOP_LEVEL
|
||||||
typeParameters: []
|
typeParameters: []
|
||||||
|
|||||||
@@ -14,7 +14,6 @@ KtFirClassOrObjectSymbol:
|
|||||||
modality: ABSTRACT
|
modality: ABSTRACT
|
||||||
name: MutableEntry
|
name: MutableEntry
|
||||||
origin: LIBRARY
|
origin: LIBRARY
|
||||||
primaryConstructor: null
|
|
||||||
superTypes: [[] kotlin/collections/Map.Entry<K, V>]
|
superTypes: [[] kotlin/collections/Map.Entry<K, V>]
|
||||||
symbolKind: MEMBER
|
symbolKind: MEMBER
|
||||||
typeParameters: [KtFirTypeParameterSymbol(K), KtFirTypeParameterSymbol(V)]
|
typeParameters: [KtFirTypeParameterSymbol(K), KtFirTypeParameterSymbol(V)]
|
||||||
|
|||||||
@@ -15,7 +15,6 @@ KtFirClassOrObjectSymbol:
|
|||||||
modality: FINAL
|
modality: FINAL
|
||||||
name: A
|
name: A
|
||||||
origin: SOURCE
|
origin: SOURCE
|
||||||
primaryConstructor: KtFirConstructorSymbol(<constructor>)
|
|
||||||
superTypes: [[] kotlin/Any]
|
superTypes: [[] kotlin/Any]
|
||||||
symbolKind: TOP_LEVEL
|
symbolKind: TOP_LEVEL
|
||||||
typeParameters: []
|
typeParameters: []
|
||||||
|
|||||||
@@ -27,7 +27,6 @@ KtFirClassOrObjectSymbol:
|
|||||||
modality: FINAL
|
modality: FINAL
|
||||||
name: A
|
name: A
|
||||||
origin: SOURCE
|
origin: SOURCE
|
||||||
primaryConstructor: KtFirConstructorSymbol(<constructor>)
|
|
||||||
superTypes: [[] kotlin/Any]
|
superTypes: [[] kotlin/Any]
|
||||||
symbolKind: TOP_LEVEL
|
symbolKind: TOP_LEVEL
|
||||||
typeParameters: []
|
typeParameters: []
|
||||||
|
|||||||
@@ -80,7 +80,6 @@ KtFirClassOrObjectSymbol:
|
|||||||
modality: FINAL
|
modality: FINAL
|
||||||
name: A
|
name: A
|
||||||
origin: SOURCE
|
origin: SOURCE
|
||||||
primaryConstructor: KtFirConstructorSymbol(<constructor>)
|
|
||||||
superTypes: [[] kotlin/Any]
|
superTypes: [[] kotlin/Any]
|
||||||
symbolKind: TOP_LEVEL
|
symbolKind: TOP_LEVEL
|
||||||
typeParameters: []
|
typeParameters: []
|
||||||
|
|||||||
@@ -30,7 +30,6 @@ KtFirClassOrObjectSymbol:
|
|||||||
modality: FINAL
|
modality: FINAL
|
||||||
name: X
|
name: X
|
||||||
origin: SOURCE
|
origin: SOURCE
|
||||||
primaryConstructor: KtFirConstructorSymbol(<constructor>)
|
|
||||||
superTypes: [[] kotlin/Enum<X>]
|
superTypes: [[] kotlin/Enum<X>]
|
||||||
symbolKind: TOP_LEVEL
|
symbolKind: TOP_LEVEL
|
||||||
typeParameters: []
|
typeParameters: []
|
||||||
|
|||||||
@@ -57,7 +57,6 @@ KtFirClassOrObjectSymbol:
|
|||||||
modality: FINAL
|
modality: FINAL
|
||||||
name: A
|
name: A
|
||||||
origin: SOURCE
|
origin: SOURCE
|
||||||
primaryConstructor: KtFirConstructorSymbol(<constructor>)
|
|
||||||
superTypes: [[] kotlin/Any]
|
superTypes: [[] kotlin/Any]
|
||||||
symbolKind: TOP_LEVEL
|
symbolKind: TOP_LEVEL
|
||||||
typeParameters: []
|
typeParameters: []
|
||||||
|
|||||||
@@ -76,7 +76,6 @@ KtFirClassOrObjectSymbol:
|
|||||||
modality: FINAL
|
modality: FINAL
|
||||||
name: A
|
name: A
|
||||||
origin: SOURCE
|
origin: SOURCE
|
||||||
primaryConstructor: KtFirConstructorSymbol(<constructor>)
|
|
||||||
superTypes: [[] kotlin/Any]
|
superTypes: [[] kotlin/Any]
|
||||||
symbolKind: TOP_LEVEL
|
symbolKind: TOP_LEVEL
|
||||||
typeParameters: []
|
typeParameters: []
|
||||||
|
|||||||
@@ -14,7 +14,6 @@ KtFirClassOrObjectSymbol:
|
|||||||
modality: ABSTRACT
|
modality: ABSTRACT
|
||||||
name: Iterator
|
name: Iterator
|
||||||
origin: LIBRARY
|
origin: LIBRARY
|
||||||
primaryConstructor: null
|
|
||||||
superTypes: [[] kotlin/Any]
|
superTypes: [[] kotlin/Any]
|
||||||
symbolKind: TOP_LEVEL
|
symbolKind: TOP_LEVEL
|
||||||
typeParameters: [KtFirTypeParameterSymbol(T)]
|
typeParameters: [KtFirTypeParameterSymbol(T)]
|
||||||
|
|||||||
@@ -14,7 +14,6 @@ KtFirClassOrObjectSymbol:
|
|||||||
modality: FINAL
|
modality: FINAL
|
||||||
name: FileWalkDirection
|
name: FileWalkDirection
|
||||||
origin: LIBRARY
|
origin: LIBRARY
|
||||||
primaryConstructor: KtFirConstructorSymbol(<constructor>)
|
|
||||||
superTypes: [[] kotlin/Enum<kotlin/io/FileWalkDirection>]
|
superTypes: [[] kotlin/Enum<kotlin/io/FileWalkDirection>]
|
||||||
symbolKind: TOP_LEVEL
|
symbolKind: TOP_LEVEL
|
||||||
typeParameters: []
|
typeParameters: []
|
||||||
|
|||||||
@@ -54,7 +54,6 @@ KtFirClassOrObjectSymbol:
|
|||||||
modality: FINAL
|
modality: FINAL
|
||||||
name: Anno
|
name: Anno
|
||||||
origin: SOURCE
|
origin: SOURCE
|
||||||
primaryConstructor: KtFirConstructorSymbol(<constructor>)
|
|
||||||
superTypes: [[] kotlin/Annotation]
|
superTypes: [[] kotlin/Annotation]
|
||||||
symbolKind: TOP_LEVEL
|
symbolKind: TOP_LEVEL
|
||||||
typeParameters: []
|
typeParameters: []
|
||||||
@@ -93,7 +92,6 @@ KtFirClassOrObjectSymbol:
|
|||||||
modality: FINAL
|
modality: FINAL
|
||||||
name: X
|
name: X
|
||||||
origin: SOURCE
|
origin: SOURCE
|
||||||
primaryConstructor: KtFirConstructorSymbol(<constructor>)
|
|
||||||
superTypes: [[] kotlin/Any]
|
superTypes: [[] kotlin/Any]
|
||||||
symbolKind: TOP_LEVEL
|
symbolKind: TOP_LEVEL
|
||||||
typeParameters: []
|
typeParameters: []
|
||||||
|
|||||||
@@ -94,7 +94,6 @@ KtFirClassOrObjectSymbol:
|
|||||||
modality: FINAL
|
modality: FINAL
|
||||||
name: AnonymousContainer
|
name: AnonymousContainer
|
||||||
origin: SOURCE
|
origin: SOURCE
|
||||||
primaryConstructor: KtFirConstructorSymbol(<constructor>)
|
|
||||||
superTypes: [[] kotlin/Any]
|
superTypes: [[] kotlin/Any]
|
||||||
symbolKind: TOP_LEVEL
|
symbolKind: TOP_LEVEL
|
||||||
typeParameters: []
|
typeParameters: []
|
||||||
|
|||||||
@@ -16,7 +16,6 @@ KtFirClassOrObjectSymbol:
|
|||||||
modality: FINAL
|
modality: FINAL
|
||||||
name: A
|
name: A
|
||||||
origin: SOURCE
|
origin: SOURCE
|
||||||
primaryConstructor: KtFirConstructorSymbol(<constructor>)
|
|
||||||
superTypes: [[] kotlin/Any]
|
superTypes: [[] kotlin/Any]
|
||||||
symbolKind: TOP_LEVEL
|
symbolKind: TOP_LEVEL
|
||||||
typeParameters: []
|
typeParameters: []
|
||||||
|
|||||||
@@ -61,7 +61,6 @@ KtFirClassOrObjectSymbol:
|
|||||||
modality: FINAL
|
modality: FINAL
|
||||||
name: A
|
name: A
|
||||||
origin: SOURCE
|
origin: SOURCE
|
||||||
primaryConstructor: KtFirConstructorSymbol(<constructor>)
|
|
||||||
superTypes: [[] kotlin/Any]
|
superTypes: [[] kotlin/Any]
|
||||||
symbolKind: TOP_LEVEL
|
symbolKind: TOP_LEVEL
|
||||||
typeParameters: []
|
typeParameters: []
|
||||||
|
|||||||
@@ -30,7 +30,6 @@ KtFirClassOrObjectSymbol:
|
|||||||
modality: FINAL
|
modality: FINAL
|
||||||
name: A
|
name: A
|
||||||
origin: SOURCE
|
origin: SOURCE
|
||||||
primaryConstructor: KtFirConstructorSymbol(<constructor>)
|
|
||||||
superTypes: [[] kotlin/Any]
|
superTypes: [[] kotlin/Any]
|
||||||
symbolKind: TOP_LEVEL
|
symbolKind: TOP_LEVEL
|
||||||
typeParameters: [KtFirTypeParameterSymbol(T), KtFirTypeParameterSymbol(R)]
|
typeParameters: [KtFirTypeParameterSymbol(T), KtFirTypeParameterSymbol(R)]
|
||||||
|
|||||||
@@ -47,7 +47,6 @@ KtFirClassOrObjectSymbol:
|
|||||||
modality: FINAL
|
modality: FINAL
|
||||||
name: F
|
name: F
|
||||||
origin: SOURCE
|
origin: SOURCE
|
||||||
primaryConstructor: KtFirConstructorSymbol(<constructor>)
|
|
||||||
superTypes: [[] kotlin/Any]
|
superTypes: [[] kotlin/Any]
|
||||||
symbolKind: LOCAL
|
symbolKind: LOCAL
|
||||||
typeParameters: []
|
typeParameters: []
|
||||||
|
|||||||
@@ -30,7 +30,6 @@ KtFirClassOrObjectSymbol:
|
|||||||
modality: FINAL
|
modality: FINAL
|
||||||
name: Anno1
|
name: Anno1
|
||||||
origin: SOURCE
|
origin: SOURCE
|
||||||
primaryConstructor: KtFirConstructorSymbol(<constructor>)
|
|
||||||
superTypes: [[] kotlin/Annotation]
|
superTypes: [[] kotlin/Annotation]
|
||||||
symbolKind: TOP_LEVEL
|
symbolKind: TOP_LEVEL
|
||||||
typeParameters: []
|
typeParameters: []
|
||||||
@@ -49,7 +48,6 @@ KtFirClassOrObjectSymbol:
|
|||||||
modality: FINAL
|
modality: FINAL
|
||||||
name: Anno2
|
name: Anno2
|
||||||
origin: SOURCE
|
origin: SOURCE
|
||||||
primaryConstructor: KtFirConstructorSymbol(<constructor>)
|
|
||||||
superTypes: [[] kotlin/Annotation]
|
superTypes: [[] kotlin/Annotation]
|
||||||
symbolKind: TOP_LEVEL
|
symbolKind: TOP_LEVEL
|
||||||
typeParameters: []
|
typeParameters: []
|
||||||
@@ -68,7 +66,6 @@ KtFirClassOrObjectSymbol:
|
|||||||
modality: FINAL
|
modality: FINAL
|
||||||
name: Anno3
|
name: Anno3
|
||||||
origin: SOURCE
|
origin: SOURCE
|
||||||
primaryConstructor: KtFirConstructorSymbol(<constructor>)
|
|
||||||
superTypes: [[] kotlin/Annotation]
|
superTypes: [[] kotlin/Annotation]
|
||||||
symbolKind: TOP_LEVEL
|
symbolKind: TOP_LEVEL
|
||||||
typeParameters: []
|
typeParameters: []
|
||||||
@@ -87,7 +84,6 @@ KtFirClassOrObjectSymbol:
|
|||||||
modality: FINAL
|
modality: FINAL
|
||||||
name: Anno4
|
name: Anno4
|
||||||
origin: SOURCE
|
origin: SOURCE
|
||||||
primaryConstructor: KtFirConstructorSymbol(<constructor>)
|
|
||||||
superTypes: [[] kotlin/Annotation]
|
superTypes: [[] kotlin/Annotation]
|
||||||
symbolKind: TOP_LEVEL
|
symbolKind: TOP_LEVEL
|
||||||
typeParameters: []
|
typeParameters: []
|
||||||
@@ -106,7 +102,6 @@ KtFirClassOrObjectSymbol:
|
|||||||
modality: ABSTRACT
|
modality: ABSTRACT
|
||||||
name: I
|
name: I
|
||||||
origin: SOURCE
|
origin: SOURCE
|
||||||
primaryConstructor: null
|
|
||||||
superTypes: [[] kotlin/Any]
|
superTypes: [[] kotlin/Any]
|
||||||
symbolKind: TOP_LEVEL
|
symbolKind: TOP_LEVEL
|
||||||
typeParameters: []
|
typeParameters: []
|
||||||
@@ -177,7 +172,6 @@ KtFirClassOrObjectSymbol:
|
|||||||
modality: FINAL
|
modality: FINAL
|
||||||
name: X
|
name: X
|
||||||
origin: SOURCE
|
origin: SOURCE
|
||||||
primaryConstructor: KtFirConstructorSymbol(<constructor>)
|
|
||||||
superTypes: [[Anno1()] I]
|
superTypes: [[Anno1()] I]
|
||||||
symbolKind: TOP_LEVEL
|
symbolKind: TOP_LEVEL
|
||||||
typeParameters: []
|
typeParameters: []
|
||||||
|
|||||||
+10
@@ -49,6 +49,11 @@ public class UltraLightClassSanityTestGenerated extends AbstractUltraLightClassS
|
|||||||
runTest("compiler/testData/asJava/lightClasses/AnnotationClass.kt");
|
runTest("compiler/testData/asJava/lightClasses/AnnotationClass.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("Constructors.kt")
|
||||||
|
public void testConstructors() throws Exception {
|
||||||
|
runTest("compiler/testData/asJava/lightClasses/Constructors.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("DataClassWithCustomImplementedMembers.kt")
|
@TestMetadata("DataClassWithCustomImplementedMembers.kt")
|
||||||
public void testDataClassWithCustomImplementedMembers() throws Exception {
|
public void testDataClassWithCustomImplementedMembers() throws Exception {
|
||||||
runTest("compiler/testData/asJava/lightClasses/DataClassWithCustomImplementedMembers.kt");
|
runTest("compiler/testData/asJava/lightClasses/DataClassWithCustomImplementedMembers.kt");
|
||||||
@@ -129,6 +134,11 @@ public class UltraLightClassSanityTestGenerated extends AbstractUltraLightClassS
|
|||||||
runTest("compiler/testData/asJava/lightClasses/NonDataClassWithComponentFunctions.kt");
|
runTest("compiler/testData/asJava/lightClasses/NonDataClassWithComponentFunctions.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("OnlySecondaryConstructors.kt")
|
||||||
|
public void testOnlySecondaryConstructors() throws Exception {
|
||||||
|
runTest("compiler/testData/asJava/lightClasses/OnlySecondaryConstructors.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("PublishedApi.kt")
|
@TestMetadata("PublishedApi.kt")
|
||||||
public void testPublishedApi() throws Exception {
|
public void testPublishedApi() throws Exception {
|
||||||
runTest("compiler/testData/asJava/lightClasses/PublishedApi.kt");
|
runTest("compiler/testData/asJava/lightClasses/PublishedApi.kt");
|
||||||
|
|||||||
Generated
+10
@@ -49,6 +49,11 @@ public class IdeCompiledLightClassTestGenerated extends AbstractIdeCompiledLight
|
|||||||
runTest("compiler/testData/asJava/lightClasses/AnnotationClass.kt");
|
runTest("compiler/testData/asJava/lightClasses/AnnotationClass.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("Constructors.kt")
|
||||||
|
public void testConstructors() throws Exception {
|
||||||
|
runTest("compiler/testData/asJava/lightClasses/Constructors.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("DataClassWithCustomImplementedMembers.kt")
|
@TestMetadata("DataClassWithCustomImplementedMembers.kt")
|
||||||
public void testDataClassWithCustomImplementedMembers() throws Exception {
|
public void testDataClassWithCustomImplementedMembers() throws Exception {
|
||||||
runTest("compiler/testData/asJava/lightClasses/DataClassWithCustomImplementedMembers.kt");
|
runTest("compiler/testData/asJava/lightClasses/DataClassWithCustomImplementedMembers.kt");
|
||||||
@@ -129,6 +134,11 @@ public class IdeCompiledLightClassTestGenerated extends AbstractIdeCompiledLight
|
|||||||
runTest("compiler/testData/asJava/lightClasses/NonDataClassWithComponentFunctions.kt");
|
runTest("compiler/testData/asJava/lightClasses/NonDataClassWithComponentFunctions.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("OnlySecondaryConstructors.kt")
|
||||||
|
public void testOnlySecondaryConstructors() throws Exception {
|
||||||
|
runTest("compiler/testData/asJava/lightClasses/OnlySecondaryConstructors.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("PublishedApi.kt")
|
@TestMetadata("PublishedApi.kt")
|
||||||
public void testPublishedApi() throws Exception {
|
public void testPublishedApi() throws Exception {
|
||||||
runTest("compiler/testData/asJava/lightClasses/PublishedApi.kt");
|
runTest("compiler/testData/asJava/lightClasses/PublishedApi.kt");
|
||||||
|
|||||||
+10
@@ -49,6 +49,11 @@ public class IdeLightClassTestGenerated extends AbstractIdeLightClassTest {
|
|||||||
runTest("compiler/testData/asJava/lightClasses/AnnotationClass.kt");
|
runTest("compiler/testData/asJava/lightClasses/AnnotationClass.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("Constructors.kt")
|
||||||
|
public void testConstructors() throws Exception {
|
||||||
|
runTest("compiler/testData/asJava/lightClasses/Constructors.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("DataClassWithCustomImplementedMembers.kt")
|
@TestMetadata("DataClassWithCustomImplementedMembers.kt")
|
||||||
public void testDataClassWithCustomImplementedMembers() throws Exception {
|
public void testDataClassWithCustomImplementedMembers() throws Exception {
|
||||||
runTest("compiler/testData/asJava/lightClasses/DataClassWithCustomImplementedMembers.kt");
|
runTest("compiler/testData/asJava/lightClasses/DataClassWithCustomImplementedMembers.kt");
|
||||||
@@ -129,6 +134,11 @@ public class IdeLightClassTestGenerated extends AbstractIdeLightClassTest {
|
|||||||
runTest("compiler/testData/asJava/lightClasses/NonDataClassWithComponentFunctions.kt");
|
runTest("compiler/testData/asJava/lightClasses/NonDataClassWithComponentFunctions.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("OnlySecondaryConstructors.kt")
|
||||||
|
public void testOnlySecondaryConstructors() throws Exception {
|
||||||
|
runTest("compiler/testData/asJava/lightClasses/OnlySecondaryConstructors.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("PublishedApi.kt")
|
@TestMetadata("PublishedApi.kt")
|
||||||
public void testPublishedApi() throws Exception {
|
public void testPublishedApi() throws Exception {
|
||||||
runTest("compiler/testData/asJava/lightClasses/PublishedApi.kt");
|
runTest("compiler/testData/asJava/lightClasses/PublishedApi.kt");
|
||||||
|
|||||||
Reference in New Issue
Block a user