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");
|
||||
}
|
||||
|
||||
@TestMetadata("Constructors.kt")
|
||||
public void testConstructors() throws Exception {
|
||||
runTest("compiler/testData/asJava/lightClasses/Constructors.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("DataClassWithCustomImplementedMembers.kt")
|
||||
public void testDataClassWithCustomImplementedMembers() throws Exception {
|
||||
runTest("compiler/testData/asJava/lightClasses/DataClassWithCustomImplementedMembers.kt");
|
||||
@@ -129,6 +134,11 @@ public class CompilerLightClassTestGenerated extends AbstractCompilerLightClassT
|
||||
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")
|
||||
public void testPublishedApi() throws Exception {
|
||||
runTest("compiler/testData/asJava/lightClasses/PublishedApi.kt");
|
||||
|
||||
+10
@@ -49,6 +49,11 @@ public class FirLightClassTestGenerated extends AbstractFirLightClassTest {
|
||||
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")
|
||||
public void testDataClassWithCustomImplementedMembers() throws Exception {
|
||||
runTest("compiler/testData/asJava/lightClasses/DataClassWithCustomImplementedMembers.kt");
|
||||
@@ -129,6 +134,11 @@ public class FirLightClassTestGenerated extends AbstractFirLightClassTest {
|
||||
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")
|
||||
public void testPublishedApi() throws Exception {
|
||||
runTest("compiler/testData/asJava/lightClasses/PublishedApi.kt");
|
||||
|
||||
@@ -26,11 +26,13 @@ interface KtScope : ValidityTokenOwner {
|
||||
sequence {
|
||||
yieldAll(getCallableSymbols())
|
||||
yieldAll(getClassifierSymbols())
|
||||
yieldAll(getConstructors())
|
||||
}
|
||||
}
|
||||
|
||||
fun getCallableSymbols(nameFilter: KtScopeNameFilter = { true }): Sequence<KtCallableSymbol>
|
||||
fun getClassifierSymbols(nameFilter: KtScopeNameFilter = { true }): Sequence<KtClassifierSymbol>
|
||||
fun getConstructors(): Sequence<KtConstructorSymbol>
|
||||
|
||||
fun containsName(name: Name): Boolean = withValidityAssertion {
|
||||
name in getCallableNames() || name in getClassifierNames()
|
||||
|
||||
-2
@@ -54,8 +54,6 @@ abstract class KtClassOrObjectSymbol : KtClassLikeSymbol(),
|
||||
|
||||
abstract val superTypes: List<KtTypeAndAnnotations>
|
||||
|
||||
abstract val primaryConstructor: KtConstructorSymbol?
|
||||
|
||||
abstract override fun createPointer(): KtSymbolPointer<KtClassOrObjectSymbol>
|
||||
}
|
||||
|
||||
|
||||
+5
-21
@@ -6,16 +6,10 @@
|
||||
package org.jetbrains.kotlin.idea.asJava
|
||||
|
||||
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.elements.KtLightField
|
||||
import org.jetbrains.kotlin.asJava.elements.KtLightMethod
|
||||
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.symbols.*
|
||||
import org.jetbrains.kotlin.idea.frontend.api.symbols.markers.KtSymbolKind
|
||||
@@ -91,8 +85,11 @@ internal class FirLightClassForSymbol(
|
||||
val result = mutableListOf<KtLightMethod>()
|
||||
|
||||
analyzeWithSymbolAsContext(classOrObjectSymbol) {
|
||||
val callableSymbols = classOrObjectSymbol.getDeclaredMemberScope().getCallableSymbols()
|
||||
val visibleDeclarations = callableSymbols.applyIf(isEnum) {
|
||||
val declaredMemberScope = classOrObjectSymbol.getDeclaredMemberScope()
|
||||
|
||||
createConstructors(declaredMemberScope.getConstructors(), result)
|
||||
|
||||
val visibleDeclarations = declaredMemberScope.getCallableSymbols().applyIf(isEnum) {
|
||||
filterNot { function ->
|
||||
function is KtFunctionSymbol && function.name.asString().let { it == "values" || it == "valueOf" }
|
||||
}
|
||||
@@ -106,19 +103,6 @@ internal class FirLightClassForSymbol(
|
||||
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)
|
||||
|
||||
result
|
||||
|
||||
+18
-11
@@ -121,6 +121,23 @@ private fun lightClassForEnumEntry(ktEnumEntry: KtEnumEntry): 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(
|
||||
declarations: Sequence<KtCallableSymbol>,
|
||||
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 -> {
|
||||
|
||||
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.symbols.KtCallableSymbol
|
||||
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.withValidityAssertion
|
||||
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 {
|
||||
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.symbols.KtCallableSymbol
|
||||
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.name.Name
|
||||
|
||||
@@ -49,6 +50,10 @@ internal abstract class KtFirDelegatingScope<S>(
|
||||
firScope.getClassifierSymbols(getClassifierNames().filter(nameFilter), builder)
|
||||
}
|
||||
|
||||
override fun getConstructors(): Sequence<KtConstructorSymbol> = withValidityAssertion {
|
||||
firScope.getConstructors(builder)
|
||||
}
|
||||
|
||||
override fun containsName(name: Name): Boolean = withValidityAssertion {
|
||||
name in getAllNames()
|
||||
}
|
||||
@@ -70,15 +75,6 @@ internal fun FirScope.getCallableSymbols(callableNames: Collection<Name>, builde
|
||||
}
|
||||
callables.add(symbol)
|
||||
}
|
||||
|
||||
if (name.isSpecial && name.asString() == "<init>") {
|
||||
processDeclaredConstructors { firConstructor ->
|
||||
firConstructor.fir.let { fir ->
|
||||
callables.add(builder.buildConstructorSymbol(fir))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
yieldAll(callables)
|
||||
}
|
||||
}
|
||||
@@ -93,3 +89,12 @@ internal fun FirScope.getClassifierSymbols(classLikeNames: Collection<Name>, bui
|
||||
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.symbols.KtCallableSymbol
|
||||
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.name.Name
|
||||
|
||||
@@ -26,6 +27,9 @@ internal class KtFirEmptyMemberScope(override val owner: KtSymbolWithMembers) :
|
||||
override fun getClassifierSymbols(nameFilter: KtScopeNameFilter): Sequence<KtClassifierSymbol> =
|
||||
emptySequence()
|
||||
|
||||
override fun getConstructors(): Sequence<KtConstructorSymbol> =
|
||||
emptySequence()
|
||||
|
||||
override val token: ValidityToken
|
||||
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.symbols.KtCallableSymbol
|
||||
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.withValidityAssertion
|
||||
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.symbols.KtCallableSymbol
|
||||
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.name.Name
|
||||
|
||||
@@ -51,6 +52,7 @@ internal class KtFirNonStarImportingScope(
|
||||
firScope.getClassifierSymbols(getClassifierNames().filter(nameFilter), builder)
|
||||
}
|
||||
|
||||
override fun getConstructors(): Sequence<KtConstructorSymbol> = emptySequence()
|
||||
|
||||
override fun getCallableNames(): Set<Name> = withValidityAssertion {
|
||||
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.symbols.KtCallableSymbol
|
||||
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.stubindex.KotlinTopLevelClassByPackageIndex
|
||||
import org.jetbrains.kotlin.idea.stubindex.KotlinTopLevelFunctionByPackageIndex
|
||||
@@ -52,4 +53,6 @@ internal class KtFirPackageScope(
|
||||
override fun getClassifierSymbols(nameFilter: KtScopeNameFilter): Sequence<KtClassifierSymbol> = withValidityAssertion {
|
||||
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.symbols.KtCallableSymbol
|
||||
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.stubindex.KotlinTopLevelClassByPackageIndex
|
||||
import org.jetbrains.kotlin.idea.stubindex.KotlinTopLevelFunctionByPackageIndex
|
||||
@@ -56,6 +57,8 @@ internal class KtFirStarImportingScope(
|
||||
firScope.getClassifierSymbols(getClassifierNames().filter(nameFilter), builder)
|
||||
}
|
||||
|
||||
override fun getConstructors(): Sequence<KtConstructorSymbol> = emptySequence()
|
||||
|
||||
// todo cache?
|
||||
@OptIn(ExperimentalStdlibApi::class)
|
||||
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.symbols.KtClassKind
|
||||
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.pointers.CanNotCreateSymbolPointerForLocalLibraryDeclarationException
|
||||
import org.jetbrains.kotlin.idea.frontend.api.symbols.pointers.KtPsiBasedSymbolPointer
|
||||
@@ -62,10 +61,6 @@ internal class KtFirClassOrObjectSymbol(
|
||||
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 ->
|
||||
fir.typeParameters.map { typeParameter ->
|
||||
builder.buildTypeParameterSymbol(typeParameter.symbol.fir)
|
||||
|
||||
@@ -67,7 +67,6 @@ KtFirClassOrObjectSymbol:
|
||||
modality: FINAL
|
||||
name: C
|
||||
origin: SOURCE
|
||||
primaryConstructor: KtFirConstructorSymbol(<constructor>)
|
||||
superTypes: [[] kotlin/Any]
|
||||
symbolKind: TOP_LEVEL
|
||||
typeParameters: []
|
||||
@@ -86,7 +85,6 @@ KtFirClassOrObjectSymbol:
|
||||
modality: ABSTRACT
|
||||
name: I
|
||||
origin: SOURCE
|
||||
primaryConstructor: null
|
||||
superTypes: [[] kotlin/Any]
|
||||
symbolKind: TOP_LEVEL
|
||||
typeParameters: []
|
||||
|
||||
+12
-13
@@ -1161,18 +1161,6 @@ KtFirFunctionSymbol:
|
||||
valueParameters: [KtFirFunctionValueParameterSymbol(other)]
|
||||
visibility: PUBLIC
|
||||
|
||||
KtFirConstructorSymbol:
|
||||
annotatedType: [] kotlin/Int
|
||||
annotations: []
|
||||
containingClassIdIfNonLocal: kotlin/Int
|
||||
dispatchType: null
|
||||
isPrimary: true
|
||||
origin: LIBRARY
|
||||
symbolKind: MEMBER
|
||||
typeParameters: []
|
||||
valueParameters: []
|
||||
visibility: PRIVATE
|
||||
|
||||
KtFirFunctionSymbol:
|
||||
annotatedType: [] kotlin/Boolean
|
||||
annotations: []
|
||||
@@ -1246,8 +1234,19 @@ KtFirClassOrObjectSymbol:
|
||||
modality: FINAL
|
||||
name: Companion
|
||||
origin: LIBRARY
|
||||
primaryConstructor: KtFirConstructorSymbol(<constructor>)
|
||||
superTypes: [[] kotlin/Any]
|
||||
symbolKind: MEMBER
|
||||
typeParameters: []
|
||||
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: []
|
||||
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:
|
||||
annotatedType: [] java/lang/String
|
||||
annotations: []
|
||||
@@ -1377,42 +1415,3 @@ KtFirConstructorSymbol:
|
||||
typeParameters: []
|
||||
valueParameters: [KtFirConstructorValueParameterSymbol(offset), KtFirConstructorValueParameterSymbol(count), KtFirConstructorValueParameterSymbol(value)]
|
||||
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
|
||||
name: Lazy
|
||||
origin: LIBRARY
|
||||
primaryConstructor: null
|
||||
superTypes: [[] kotlin/Any]
|
||||
symbolKind: TOP_LEVEL
|
||||
typeParameters: [KtFirTypeParameterSymbol(T)]
|
||||
|
||||
@@ -16,7 +16,6 @@ KtFirClassOrObjectSymbol:
|
||||
modality: FINAL
|
||||
name: String
|
||||
origin: JAVA
|
||||
primaryConstructor: null
|
||||
superTypes: [[] kotlin/Any, [] java/io/Serializable, [] kotlin/Comparable<ft<@FlexibleNullability kotlin/String, kotlin/String?>!>, [] kotlin/CharSequence]
|
||||
symbolKind: TOP_LEVEL
|
||||
typeParameters: []
|
||||
|
||||
@@ -14,7 +14,6 @@ KtFirClassOrObjectSymbol:
|
||||
modality: ABSTRACT
|
||||
name: MutableEntry
|
||||
origin: LIBRARY
|
||||
primaryConstructor: null
|
||||
superTypes: [[] kotlin/collections/Map.Entry<K, V>]
|
||||
symbolKind: MEMBER
|
||||
typeParameters: [KtFirTypeParameterSymbol(K), KtFirTypeParameterSymbol(V)]
|
||||
|
||||
@@ -15,7 +15,6 @@ KtFirClassOrObjectSymbol:
|
||||
modality: FINAL
|
||||
name: A
|
||||
origin: SOURCE
|
||||
primaryConstructor: KtFirConstructorSymbol(<constructor>)
|
||||
superTypes: [[] kotlin/Any]
|
||||
symbolKind: TOP_LEVEL
|
||||
typeParameters: []
|
||||
|
||||
@@ -27,7 +27,6 @@ KtFirClassOrObjectSymbol:
|
||||
modality: FINAL
|
||||
name: A
|
||||
origin: SOURCE
|
||||
primaryConstructor: KtFirConstructorSymbol(<constructor>)
|
||||
superTypes: [[] kotlin/Any]
|
||||
symbolKind: TOP_LEVEL
|
||||
typeParameters: []
|
||||
|
||||
@@ -80,7 +80,6 @@ KtFirClassOrObjectSymbol:
|
||||
modality: FINAL
|
||||
name: A
|
||||
origin: SOURCE
|
||||
primaryConstructor: KtFirConstructorSymbol(<constructor>)
|
||||
superTypes: [[] kotlin/Any]
|
||||
symbolKind: TOP_LEVEL
|
||||
typeParameters: []
|
||||
|
||||
@@ -30,7 +30,6 @@ KtFirClassOrObjectSymbol:
|
||||
modality: FINAL
|
||||
name: X
|
||||
origin: SOURCE
|
||||
primaryConstructor: KtFirConstructorSymbol(<constructor>)
|
||||
superTypes: [[] kotlin/Enum<X>]
|
||||
symbolKind: TOP_LEVEL
|
||||
typeParameters: []
|
||||
|
||||
@@ -57,7 +57,6 @@ KtFirClassOrObjectSymbol:
|
||||
modality: FINAL
|
||||
name: A
|
||||
origin: SOURCE
|
||||
primaryConstructor: KtFirConstructorSymbol(<constructor>)
|
||||
superTypes: [[] kotlin/Any]
|
||||
symbolKind: TOP_LEVEL
|
||||
typeParameters: []
|
||||
|
||||
@@ -76,7 +76,6 @@ KtFirClassOrObjectSymbol:
|
||||
modality: FINAL
|
||||
name: A
|
||||
origin: SOURCE
|
||||
primaryConstructor: KtFirConstructorSymbol(<constructor>)
|
||||
superTypes: [[] kotlin/Any]
|
||||
symbolKind: TOP_LEVEL
|
||||
typeParameters: []
|
||||
|
||||
@@ -14,7 +14,6 @@ KtFirClassOrObjectSymbol:
|
||||
modality: ABSTRACT
|
||||
name: Iterator
|
||||
origin: LIBRARY
|
||||
primaryConstructor: null
|
||||
superTypes: [[] kotlin/Any]
|
||||
symbolKind: TOP_LEVEL
|
||||
typeParameters: [KtFirTypeParameterSymbol(T)]
|
||||
|
||||
@@ -14,7 +14,6 @@ KtFirClassOrObjectSymbol:
|
||||
modality: FINAL
|
||||
name: FileWalkDirection
|
||||
origin: LIBRARY
|
||||
primaryConstructor: KtFirConstructorSymbol(<constructor>)
|
||||
superTypes: [[] kotlin/Enum<kotlin/io/FileWalkDirection>]
|
||||
symbolKind: TOP_LEVEL
|
||||
typeParameters: []
|
||||
|
||||
@@ -54,7 +54,6 @@ KtFirClassOrObjectSymbol:
|
||||
modality: FINAL
|
||||
name: Anno
|
||||
origin: SOURCE
|
||||
primaryConstructor: KtFirConstructorSymbol(<constructor>)
|
||||
superTypes: [[] kotlin/Annotation]
|
||||
symbolKind: TOP_LEVEL
|
||||
typeParameters: []
|
||||
@@ -93,7 +92,6 @@ KtFirClassOrObjectSymbol:
|
||||
modality: FINAL
|
||||
name: X
|
||||
origin: SOURCE
|
||||
primaryConstructor: KtFirConstructorSymbol(<constructor>)
|
||||
superTypes: [[] kotlin/Any]
|
||||
symbolKind: TOP_LEVEL
|
||||
typeParameters: []
|
||||
|
||||
@@ -94,7 +94,6 @@ KtFirClassOrObjectSymbol:
|
||||
modality: FINAL
|
||||
name: AnonymousContainer
|
||||
origin: SOURCE
|
||||
primaryConstructor: KtFirConstructorSymbol(<constructor>)
|
||||
superTypes: [[] kotlin/Any]
|
||||
symbolKind: TOP_LEVEL
|
||||
typeParameters: []
|
||||
|
||||
@@ -16,7 +16,6 @@ KtFirClassOrObjectSymbol:
|
||||
modality: FINAL
|
||||
name: A
|
||||
origin: SOURCE
|
||||
primaryConstructor: KtFirConstructorSymbol(<constructor>)
|
||||
superTypes: [[] kotlin/Any]
|
||||
symbolKind: TOP_LEVEL
|
||||
typeParameters: []
|
||||
|
||||
@@ -61,7 +61,6 @@ KtFirClassOrObjectSymbol:
|
||||
modality: FINAL
|
||||
name: A
|
||||
origin: SOURCE
|
||||
primaryConstructor: KtFirConstructorSymbol(<constructor>)
|
||||
superTypes: [[] kotlin/Any]
|
||||
symbolKind: TOP_LEVEL
|
||||
typeParameters: []
|
||||
|
||||
@@ -30,7 +30,6 @@ KtFirClassOrObjectSymbol:
|
||||
modality: FINAL
|
||||
name: A
|
||||
origin: SOURCE
|
||||
primaryConstructor: KtFirConstructorSymbol(<constructor>)
|
||||
superTypes: [[] kotlin/Any]
|
||||
symbolKind: TOP_LEVEL
|
||||
typeParameters: [KtFirTypeParameterSymbol(T), KtFirTypeParameterSymbol(R)]
|
||||
|
||||
@@ -47,7 +47,6 @@ KtFirClassOrObjectSymbol:
|
||||
modality: FINAL
|
||||
name: F
|
||||
origin: SOURCE
|
||||
primaryConstructor: KtFirConstructorSymbol(<constructor>)
|
||||
superTypes: [[] kotlin/Any]
|
||||
symbolKind: LOCAL
|
||||
typeParameters: []
|
||||
|
||||
@@ -30,7 +30,6 @@ KtFirClassOrObjectSymbol:
|
||||
modality: FINAL
|
||||
name: Anno1
|
||||
origin: SOURCE
|
||||
primaryConstructor: KtFirConstructorSymbol(<constructor>)
|
||||
superTypes: [[] kotlin/Annotation]
|
||||
symbolKind: TOP_LEVEL
|
||||
typeParameters: []
|
||||
@@ -49,7 +48,6 @@ KtFirClassOrObjectSymbol:
|
||||
modality: FINAL
|
||||
name: Anno2
|
||||
origin: SOURCE
|
||||
primaryConstructor: KtFirConstructorSymbol(<constructor>)
|
||||
superTypes: [[] kotlin/Annotation]
|
||||
symbolKind: TOP_LEVEL
|
||||
typeParameters: []
|
||||
@@ -68,7 +66,6 @@ KtFirClassOrObjectSymbol:
|
||||
modality: FINAL
|
||||
name: Anno3
|
||||
origin: SOURCE
|
||||
primaryConstructor: KtFirConstructorSymbol(<constructor>)
|
||||
superTypes: [[] kotlin/Annotation]
|
||||
symbolKind: TOP_LEVEL
|
||||
typeParameters: []
|
||||
@@ -87,7 +84,6 @@ KtFirClassOrObjectSymbol:
|
||||
modality: FINAL
|
||||
name: Anno4
|
||||
origin: SOURCE
|
||||
primaryConstructor: KtFirConstructorSymbol(<constructor>)
|
||||
superTypes: [[] kotlin/Annotation]
|
||||
symbolKind: TOP_LEVEL
|
||||
typeParameters: []
|
||||
@@ -106,7 +102,6 @@ KtFirClassOrObjectSymbol:
|
||||
modality: ABSTRACT
|
||||
name: I
|
||||
origin: SOURCE
|
||||
primaryConstructor: null
|
||||
superTypes: [[] kotlin/Any]
|
||||
symbolKind: TOP_LEVEL
|
||||
typeParameters: []
|
||||
@@ -177,7 +172,6 @@ KtFirClassOrObjectSymbol:
|
||||
modality: FINAL
|
||||
name: X
|
||||
origin: SOURCE
|
||||
primaryConstructor: KtFirConstructorSymbol(<constructor>)
|
||||
superTypes: [[Anno1()] I]
|
||||
symbolKind: TOP_LEVEL
|
||||
typeParameters: []
|
||||
|
||||
+10
@@ -49,6 +49,11 @@ public class UltraLightClassSanityTestGenerated extends AbstractUltraLightClassS
|
||||
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")
|
||||
public void testDataClassWithCustomImplementedMembers() throws Exception {
|
||||
runTest("compiler/testData/asJava/lightClasses/DataClassWithCustomImplementedMembers.kt");
|
||||
@@ -129,6 +134,11 @@ public class UltraLightClassSanityTestGenerated extends AbstractUltraLightClassS
|
||||
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")
|
||||
public void testPublishedApi() throws Exception {
|
||||
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");
|
||||
}
|
||||
|
||||
@TestMetadata("Constructors.kt")
|
||||
public void testConstructors() throws Exception {
|
||||
runTest("compiler/testData/asJava/lightClasses/Constructors.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("DataClassWithCustomImplementedMembers.kt")
|
||||
public void testDataClassWithCustomImplementedMembers() throws Exception {
|
||||
runTest("compiler/testData/asJava/lightClasses/DataClassWithCustomImplementedMembers.kt");
|
||||
@@ -129,6 +134,11 @@ public class IdeCompiledLightClassTestGenerated extends AbstractIdeCompiledLight
|
||||
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")
|
||||
public void testPublishedApi() throws Exception {
|
||||
runTest("compiler/testData/asJava/lightClasses/PublishedApi.kt");
|
||||
|
||||
+10
@@ -49,6 +49,11 @@ public class IdeLightClassTestGenerated extends AbstractIdeLightClassTest {
|
||||
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")
|
||||
public void testDataClassWithCustomImplementedMembers() throws Exception {
|
||||
runTest("compiler/testData/asJava/lightClasses/DataClassWithCustomImplementedMembers.kt");
|
||||
@@ -129,6 +134,11 @@ public class IdeLightClassTestGenerated extends AbstractIdeLightClassTest {
|
||||
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")
|
||||
public void testPublishedApi() throws Exception {
|
||||
runTest("compiler/testData/asJava/lightClasses/PublishedApi.kt");
|
||||
|
||||
Reference in New Issue
Block a user