[AA] Add declared member scope tests for enum entry initializers
^KT-61425
This commit is contained in:
committed by
Space Team
parent
72de86a8ba
commit
536e172d0e
+24
@@ -46,6 +46,30 @@ public class FirIdeNormalAnalysisSourceModuleDeclaredMemberScopeTestGenerated ex
|
|||||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("analysis/analysis-api/testData/components/scopeProvider/declaredMemberScope"), Pattern.compile("^(.+)\\.kt$"), null, true);
|
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("analysis/analysis-api/testData/components/scopeProvider/declaredMemberScope"), Pattern.compile("^(.+)\\.kt$"), null, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("enumEntryInitializer.kt")
|
||||||
|
public void testEnumEntryInitializer() throws Exception {
|
||||||
|
runTest("analysis/analysis-api/testData/components/scopeProvider/declaredMemberScope/enumEntryInitializer.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("enumEntryInitializerWithEmptyBody.kt")
|
||||||
|
public void testEnumEntryInitializerWithEmptyBody() throws Exception {
|
||||||
|
runTest("analysis/analysis-api/testData/components/scopeProvider/declaredMemberScope/enumEntryInitializerWithEmptyBody.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("enumEntryInitializerWithFinalEnumMember.kt")
|
||||||
|
public void testEnumEntryInitializerWithFinalEnumMember() throws Exception {
|
||||||
|
runTest("analysis/analysis-api/testData/components/scopeProvider/declaredMemberScope/enumEntryInitializerWithFinalEnumMember.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("enumEntryInitializerWithOverriddenMember.kt")
|
||||||
|
public void testEnumEntryInitializerWithOverriddenMember() throws Exception {
|
||||||
|
runTest("analysis/analysis-api/testData/components/scopeProvider/declaredMemberScope/enumEntryInitializerWithOverriddenMember.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("javaDeclaredEnhancementScope.kt")
|
@TestMetadata("javaDeclaredEnhancementScope.kt")
|
||||||
public void testJavaDeclaredEnhancementScope() throws Exception {
|
public void testJavaDeclaredEnhancementScope() throws Exception {
|
||||||
|
|||||||
+24
@@ -46,6 +46,30 @@ public class FirStandaloneNormalAnalysisSourceModuleDeclaredMemberScopeTestGener
|
|||||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("analysis/analysis-api/testData/components/scopeProvider/declaredMemberScope"), Pattern.compile("^(.+)\\.kt$"), null, true);
|
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("analysis/analysis-api/testData/components/scopeProvider/declaredMemberScope"), Pattern.compile("^(.+)\\.kt$"), null, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("enumEntryInitializer.kt")
|
||||||
|
public void testEnumEntryInitializer() throws Exception {
|
||||||
|
runTest("analysis/analysis-api/testData/components/scopeProvider/declaredMemberScope/enumEntryInitializer.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("enumEntryInitializerWithEmptyBody.kt")
|
||||||
|
public void testEnumEntryInitializerWithEmptyBody() throws Exception {
|
||||||
|
runTest("analysis/analysis-api/testData/components/scopeProvider/declaredMemberScope/enumEntryInitializerWithEmptyBody.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("enumEntryInitializerWithFinalEnumMember.kt")
|
||||||
|
public void testEnumEntryInitializerWithFinalEnumMember() throws Exception {
|
||||||
|
runTest("analysis/analysis-api/testData/components/scopeProvider/declaredMemberScope/enumEntryInitializerWithFinalEnumMember.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("enumEntryInitializerWithOverriddenMember.kt")
|
||||||
|
public void testEnumEntryInitializerWithOverriddenMember() throws Exception {
|
||||||
|
runTest("analysis/analysis-api/testData/components/scopeProvider/declaredMemberScope/enumEntryInitializerWithOverriddenMember.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("javaDeclaredEnhancementScope.kt")
|
@TestMetadata("javaDeclaredEnhancementScope.kt")
|
||||||
public void testJavaDeclaredEnhancementScope() throws Exception {
|
public void testJavaDeclaredEnhancementScope() throws Exception {
|
||||||
|
|||||||
Vendored
+10
@@ -0,0 +1,10 @@
|
|||||||
|
// DO_NOT_CHECK_NON_PSI_SYMBOL_RESTORE_K1
|
||||||
|
package test
|
||||||
|
|
||||||
|
enum class E {
|
||||||
|
A {
|
||||||
|
val x: String = ""
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// enum_entry_initializer: test/E.A
|
||||||
+3
@@ -0,0 +1,3 @@
|
|||||||
|
val x: kotlin.String
|
||||||
|
|
||||||
|
private constructor()
|
||||||
analysis/analysis-api/testData/components/scopeProvider/declaredMemberScope/enumEntryInitializer.txt
Vendored
+107
@@ -0,0 +1,107 @@
|
|||||||
|
KtKotlinPropertySymbol:
|
||||||
|
annotationsList: []
|
||||||
|
backingFieldSymbol: KtBackingFieldSymbol:
|
||||||
|
annotationsList: []
|
||||||
|
callableIdIfNonLocal: null
|
||||||
|
contextReceivers: []
|
||||||
|
isExtension: false
|
||||||
|
name: field
|
||||||
|
origin: PROPERTY_BACKING_FIELD
|
||||||
|
owningProperty: KtKotlinPropertySymbol(<local>/x)
|
||||||
|
receiverParameter: null
|
||||||
|
returnType: KtUsualClassType:
|
||||||
|
annotationsList: []
|
||||||
|
ownTypeArguments: []
|
||||||
|
type: kotlin/String
|
||||||
|
symbolKind: LOCAL
|
||||||
|
typeParameters: []
|
||||||
|
getContainingModule: KtSourceModule "Sources of main"
|
||||||
|
deprecationStatus: null
|
||||||
|
callableIdIfNonLocal: null
|
||||||
|
contextReceivers: []
|
||||||
|
getter: KtPropertyGetterSymbol:
|
||||||
|
annotationsList: []
|
||||||
|
callableIdIfNonLocal: null
|
||||||
|
contextReceivers: []
|
||||||
|
hasBody: false
|
||||||
|
hasStableParameterNames: true
|
||||||
|
isDefault: true
|
||||||
|
isExtension: false
|
||||||
|
isInline: false
|
||||||
|
isOverride: false
|
||||||
|
modality: FINAL
|
||||||
|
origin: SOURCE
|
||||||
|
receiverParameter: null
|
||||||
|
returnType: KtUsualClassType:
|
||||||
|
annotationsList: []
|
||||||
|
ownTypeArguments: []
|
||||||
|
type: kotlin/String
|
||||||
|
symbolKind: ACCESSOR
|
||||||
|
typeParameters: []
|
||||||
|
valueParameters: []
|
||||||
|
visibility: Public
|
||||||
|
getDispatchReceiver(): KtUsualClassType:
|
||||||
|
annotationsList: []
|
||||||
|
ownTypeArguments: []
|
||||||
|
type: <anonymous>
|
||||||
|
getContainingModule: KtSourceModule "Sources of main"
|
||||||
|
deprecationStatus: null
|
||||||
|
hasBackingField: true
|
||||||
|
hasGetter: true
|
||||||
|
hasSetter: false
|
||||||
|
initializer: KtConstantInitializerValue("")
|
||||||
|
isActual: false
|
||||||
|
isConst: false
|
||||||
|
isDelegatedProperty: false
|
||||||
|
isExpect: false
|
||||||
|
isExtension: false
|
||||||
|
isFromPrimaryConstructor: false
|
||||||
|
isLateInit: false
|
||||||
|
isOverride: false
|
||||||
|
isStatic: false
|
||||||
|
isVal: true
|
||||||
|
modality: FINAL
|
||||||
|
name: x
|
||||||
|
origin: SOURCE
|
||||||
|
receiverParameter: null
|
||||||
|
returnType: KtUsualClassType:
|
||||||
|
annotationsList: []
|
||||||
|
ownTypeArguments: []
|
||||||
|
type: kotlin/String
|
||||||
|
setter: null
|
||||||
|
symbolKind: CLASS_MEMBER
|
||||||
|
typeParameters: []
|
||||||
|
visibility: Public
|
||||||
|
getDispatchReceiver(): KtUsualClassType:
|
||||||
|
annotationsList: []
|
||||||
|
ownTypeArguments: []
|
||||||
|
type: <anonymous>
|
||||||
|
getContainingModule: KtSourceModule "Sources of main"
|
||||||
|
deprecationStatus: null
|
||||||
|
getterDeprecationStatus: null
|
||||||
|
javaGetterName: getX
|
||||||
|
javaSetterName: null
|
||||||
|
setterDeprecationStatus: null
|
||||||
|
|
||||||
|
KtConstructorSymbol:
|
||||||
|
annotationsList: []
|
||||||
|
callableIdIfNonLocal: null
|
||||||
|
containingClassIdIfNonLocal: null
|
||||||
|
contextReceivers: []
|
||||||
|
hasStableParameterNames: true
|
||||||
|
isActual: false
|
||||||
|
isExpect: false
|
||||||
|
isExtension: false
|
||||||
|
isPrimary: true
|
||||||
|
origin: SOURCE_MEMBER_GENERATED
|
||||||
|
receiverParameter: null
|
||||||
|
returnType: KtUsualClassType:
|
||||||
|
annotationsList: []
|
||||||
|
ownTypeArguments: []
|
||||||
|
type: <anonymous>
|
||||||
|
symbolKind: CLASS_MEMBER
|
||||||
|
typeParameters: []
|
||||||
|
valueParameters: []
|
||||||
|
visibility: Private
|
||||||
|
getContainingModule: KtSourceModule "Sources of main"
|
||||||
|
deprecationStatus: null
|
||||||
+8
@@ -0,0 +1,8 @@
|
|||||||
|
// DO_NOT_CHECK_NON_PSI_SYMBOL_RESTORE_K1
|
||||||
|
package test
|
||||||
|
|
||||||
|
enum class E {
|
||||||
|
A {}
|
||||||
|
}
|
||||||
|
|
||||||
|
// enum_entry_initializer: test/E.A
|
||||||
+1
@@ -0,0 +1 @@
|
|||||||
|
private constructor()
|
||||||
+22
@@ -0,0 +1,22 @@
|
|||||||
|
KtConstructorSymbol:
|
||||||
|
annotationsList: []
|
||||||
|
callableIdIfNonLocal: null
|
||||||
|
containingClassIdIfNonLocal: null
|
||||||
|
contextReceivers: []
|
||||||
|
hasStableParameterNames: true
|
||||||
|
isActual: false
|
||||||
|
isExpect: false
|
||||||
|
isExtension: false
|
||||||
|
isPrimary: true
|
||||||
|
origin: SOURCE_MEMBER_GENERATED
|
||||||
|
receiverParameter: null
|
||||||
|
returnType: KtUsualClassType:
|
||||||
|
annotationsList: []
|
||||||
|
ownTypeArguments: []
|
||||||
|
type: <anonymous>
|
||||||
|
symbolKind: CLASS_MEMBER
|
||||||
|
typeParameters: []
|
||||||
|
valueParameters: []
|
||||||
|
visibility: Private
|
||||||
|
getContainingModule: KtSourceModule "Sources of main"
|
||||||
|
deprecationStatus: null
|
||||||
+12
@@ -0,0 +1,12 @@
|
|||||||
|
// DO_NOT_CHECK_NON_PSI_SYMBOL_RESTORE_K1
|
||||||
|
package test
|
||||||
|
|
||||||
|
enum class E {
|
||||||
|
A {
|
||||||
|
val x: String = ""
|
||||||
|
};
|
||||||
|
|
||||||
|
val foo: Int = 5
|
||||||
|
}
|
||||||
|
|
||||||
|
// enum_entry_initializer: test/E.A
|
||||||
+3
@@ -0,0 +1,3 @@
|
|||||||
|
val x: kotlin.String
|
||||||
|
|
||||||
|
private constructor()
|
||||||
+107
@@ -0,0 +1,107 @@
|
|||||||
|
KtKotlinPropertySymbol:
|
||||||
|
annotationsList: []
|
||||||
|
backingFieldSymbol: KtBackingFieldSymbol:
|
||||||
|
annotationsList: []
|
||||||
|
callableIdIfNonLocal: null
|
||||||
|
contextReceivers: []
|
||||||
|
isExtension: false
|
||||||
|
name: field
|
||||||
|
origin: PROPERTY_BACKING_FIELD
|
||||||
|
owningProperty: KtKotlinPropertySymbol(<local>/x)
|
||||||
|
receiverParameter: null
|
||||||
|
returnType: KtUsualClassType:
|
||||||
|
annotationsList: []
|
||||||
|
ownTypeArguments: []
|
||||||
|
type: kotlin/String
|
||||||
|
symbolKind: LOCAL
|
||||||
|
typeParameters: []
|
||||||
|
getContainingModule: KtSourceModule "Sources of main"
|
||||||
|
deprecationStatus: null
|
||||||
|
callableIdIfNonLocal: null
|
||||||
|
contextReceivers: []
|
||||||
|
getter: KtPropertyGetterSymbol:
|
||||||
|
annotationsList: []
|
||||||
|
callableIdIfNonLocal: null
|
||||||
|
contextReceivers: []
|
||||||
|
hasBody: false
|
||||||
|
hasStableParameterNames: true
|
||||||
|
isDefault: true
|
||||||
|
isExtension: false
|
||||||
|
isInline: false
|
||||||
|
isOverride: false
|
||||||
|
modality: FINAL
|
||||||
|
origin: SOURCE
|
||||||
|
receiverParameter: null
|
||||||
|
returnType: KtUsualClassType:
|
||||||
|
annotationsList: []
|
||||||
|
ownTypeArguments: []
|
||||||
|
type: kotlin/String
|
||||||
|
symbolKind: ACCESSOR
|
||||||
|
typeParameters: []
|
||||||
|
valueParameters: []
|
||||||
|
visibility: Public
|
||||||
|
getDispatchReceiver(): KtUsualClassType:
|
||||||
|
annotationsList: []
|
||||||
|
ownTypeArguments: []
|
||||||
|
type: <anonymous>
|
||||||
|
getContainingModule: KtSourceModule "Sources of main"
|
||||||
|
deprecationStatus: null
|
||||||
|
hasBackingField: true
|
||||||
|
hasGetter: true
|
||||||
|
hasSetter: false
|
||||||
|
initializer: KtConstantInitializerValue("")
|
||||||
|
isActual: false
|
||||||
|
isConst: false
|
||||||
|
isDelegatedProperty: false
|
||||||
|
isExpect: false
|
||||||
|
isExtension: false
|
||||||
|
isFromPrimaryConstructor: false
|
||||||
|
isLateInit: false
|
||||||
|
isOverride: false
|
||||||
|
isStatic: false
|
||||||
|
isVal: true
|
||||||
|
modality: FINAL
|
||||||
|
name: x
|
||||||
|
origin: SOURCE
|
||||||
|
receiverParameter: null
|
||||||
|
returnType: KtUsualClassType:
|
||||||
|
annotationsList: []
|
||||||
|
ownTypeArguments: []
|
||||||
|
type: kotlin/String
|
||||||
|
setter: null
|
||||||
|
symbolKind: CLASS_MEMBER
|
||||||
|
typeParameters: []
|
||||||
|
visibility: Public
|
||||||
|
getDispatchReceiver(): KtUsualClassType:
|
||||||
|
annotationsList: []
|
||||||
|
ownTypeArguments: []
|
||||||
|
type: <anonymous>
|
||||||
|
getContainingModule: KtSourceModule "Sources of main"
|
||||||
|
deprecationStatus: null
|
||||||
|
getterDeprecationStatus: null
|
||||||
|
javaGetterName: getX
|
||||||
|
javaSetterName: null
|
||||||
|
setterDeprecationStatus: null
|
||||||
|
|
||||||
|
KtConstructorSymbol:
|
||||||
|
annotationsList: []
|
||||||
|
callableIdIfNonLocal: null
|
||||||
|
containingClassIdIfNonLocal: null
|
||||||
|
contextReceivers: []
|
||||||
|
hasStableParameterNames: true
|
||||||
|
isActual: false
|
||||||
|
isExpect: false
|
||||||
|
isExtension: false
|
||||||
|
isPrimary: true
|
||||||
|
origin: SOURCE_MEMBER_GENERATED
|
||||||
|
receiverParameter: null
|
||||||
|
returnType: KtUsualClassType:
|
||||||
|
annotationsList: []
|
||||||
|
ownTypeArguments: []
|
||||||
|
type: <anonymous>
|
||||||
|
symbolKind: CLASS_MEMBER
|
||||||
|
typeParameters: []
|
||||||
|
valueParameters: []
|
||||||
|
visibility: Private
|
||||||
|
getContainingModule: KtSourceModule "Sources of main"
|
||||||
|
deprecationStatus: null
|
||||||
+12
@@ -0,0 +1,12 @@
|
|||||||
|
// DO_NOT_CHECK_NON_PSI_SYMBOL_RESTORE_K1
|
||||||
|
package test
|
||||||
|
|
||||||
|
enum class E {
|
||||||
|
A {
|
||||||
|
override val foo: Int = 65
|
||||||
|
};
|
||||||
|
|
||||||
|
abstract val foo: Int?
|
||||||
|
}
|
||||||
|
|
||||||
|
// enum_entry_initializer: test/E.A
|
||||||
+3
@@ -0,0 +1,3 @@
|
|||||||
|
override val foo: kotlin.Int
|
||||||
|
|
||||||
|
private constructor()
|
||||||
+107
@@ -0,0 +1,107 @@
|
|||||||
|
KtKotlinPropertySymbol:
|
||||||
|
annotationsList: []
|
||||||
|
backingFieldSymbol: KtBackingFieldSymbol:
|
||||||
|
annotationsList: []
|
||||||
|
callableIdIfNonLocal: null
|
||||||
|
contextReceivers: []
|
||||||
|
isExtension: false
|
||||||
|
name: field
|
||||||
|
origin: PROPERTY_BACKING_FIELD
|
||||||
|
owningProperty: KtKotlinPropertySymbol(<local>/foo)
|
||||||
|
receiverParameter: null
|
||||||
|
returnType: KtUsualClassType:
|
||||||
|
annotationsList: []
|
||||||
|
ownTypeArguments: []
|
||||||
|
type: kotlin/Int
|
||||||
|
symbolKind: LOCAL
|
||||||
|
typeParameters: []
|
||||||
|
getContainingModule: KtSourceModule "Sources of main"
|
||||||
|
deprecationStatus: null
|
||||||
|
callableIdIfNonLocal: null
|
||||||
|
contextReceivers: []
|
||||||
|
getter: KtPropertyGetterSymbol:
|
||||||
|
annotationsList: []
|
||||||
|
callableIdIfNonLocal: null
|
||||||
|
contextReceivers: []
|
||||||
|
hasBody: false
|
||||||
|
hasStableParameterNames: true
|
||||||
|
isDefault: true
|
||||||
|
isExtension: false
|
||||||
|
isInline: false
|
||||||
|
isOverride: true
|
||||||
|
modality: FINAL
|
||||||
|
origin: SOURCE
|
||||||
|
receiverParameter: null
|
||||||
|
returnType: KtUsualClassType:
|
||||||
|
annotationsList: []
|
||||||
|
ownTypeArguments: []
|
||||||
|
type: kotlin/Int
|
||||||
|
symbolKind: ACCESSOR
|
||||||
|
typeParameters: []
|
||||||
|
valueParameters: []
|
||||||
|
visibility: Public
|
||||||
|
getDispatchReceiver(): KtUsualClassType:
|
||||||
|
annotationsList: []
|
||||||
|
ownTypeArguments: []
|
||||||
|
type: <anonymous>
|
||||||
|
getContainingModule: KtSourceModule "Sources of main"
|
||||||
|
deprecationStatus: null
|
||||||
|
hasBackingField: true
|
||||||
|
hasGetter: true
|
||||||
|
hasSetter: false
|
||||||
|
initializer: KtConstantInitializerValue(65)
|
||||||
|
isActual: false
|
||||||
|
isConst: false
|
||||||
|
isDelegatedProperty: false
|
||||||
|
isExpect: false
|
||||||
|
isExtension: false
|
||||||
|
isFromPrimaryConstructor: false
|
||||||
|
isLateInit: false
|
||||||
|
isOverride: true
|
||||||
|
isStatic: false
|
||||||
|
isVal: true
|
||||||
|
modality: OPEN
|
||||||
|
name: foo
|
||||||
|
origin: SOURCE
|
||||||
|
receiverParameter: null
|
||||||
|
returnType: KtUsualClassType:
|
||||||
|
annotationsList: []
|
||||||
|
ownTypeArguments: []
|
||||||
|
type: kotlin/Int
|
||||||
|
setter: null
|
||||||
|
symbolKind: CLASS_MEMBER
|
||||||
|
typeParameters: []
|
||||||
|
visibility: Public
|
||||||
|
getDispatchReceiver(): KtUsualClassType:
|
||||||
|
annotationsList: []
|
||||||
|
ownTypeArguments: []
|
||||||
|
type: <anonymous>
|
||||||
|
getContainingModule: KtSourceModule "Sources of main"
|
||||||
|
deprecationStatus: null
|
||||||
|
getterDeprecationStatus: null
|
||||||
|
javaGetterName: getFoo
|
||||||
|
javaSetterName: null
|
||||||
|
setterDeprecationStatus: null
|
||||||
|
|
||||||
|
KtConstructorSymbol:
|
||||||
|
annotationsList: []
|
||||||
|
callableIdIfNonLocal: null
|
||||||
|
containingClassIdIfNonLocal: null
|
||||||
|
contextReceivers: []
|
||||||
|
hasStableParameterNames: true
|
||||||
|
isActual: false
|
||||||
|
isExpect: false
|
||||||
|
isExtension: false
|
||||||
|
isPrimary: true
|
||||||
|
origin: SOURCE_MEMBER_GENERATED
|
||||||
|
receiverParameter: null
|
||||||
|
returnType: KtUsualClassType:
|
||||||
|
annotationsList: []
|
||||||
|
ownTypeArguments: []
|
||||||
|
type: <anonymous>
|
||||||
|
symbolKind: CLASS_MEMBER
|
||||||
|
typeParameters: []
|
||||||
|
valueParameters: []
|
||||||
|
visibility: Private
|
||||||
|
getContainingModule: KtSourceModule "Sources of main"
|
||||||
|
deprecationStatus: null
|
||||||
Reference in New Issue
Block a user