[AA] add more tests on java field symbols
^KT-54311
This commit is contained in:
committed by
Space Team
parent
137deadee5
commit
42f8e6fbe6
+6
@@ -88,6 +88,12 @@ public class Fe10IdeNormalAnalysisSourceModuleSymbolByReferenceTestGenerated ext
|
||||
runTest("analysis/analysis-api/testData/symbols/symbolByReference/implicitLambdaParameter.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("javaField.kt")
|
||||
public void testJavaField() throws Exception {
|
||||
runTest("analysis/analysis-api/testData/symbols/symbolByReference/javaField.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("propertyReceiverParameter.kt")
|
||||
public void testPropertyReceiverParameter() throws Exception {
|
||||
|
||||
+6
@@ -64,6 +64,12 @@ public class FirIdeNormalAnalysisSourceModuleMemberScopeByFqNameTestGenerated ex
|
||||
runTest("analysis/analysis-api/testData/scopes/memberScopeByFqName/Int.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("javaFieldClash.kt")
|
||||
public void testJavaFieldClash() throws Exception {
|
||||
runTest("analysis/analysis-api/testData/scopes/memberScopeByFqName/javaFieldClash.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("java.lang.String.kt")
|
||||
public void testJava_lang_String() throws Exception {
|
||||
|
||||
+6
@@ -88,6 +88,12 @@ public class FirIdeNormalAnalysisSourceModuleSymbolByReferenceTestGenerated exte
|
||||
runTest("analysis/analysis-api/testData/symbols/symbolByReference/implicitLambdaParameter.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("javaField.kt")
|
||||
public void testJavaField() throws Exception {
|
||||
runTest("analysis/analysis-api/testData/symbols/symbolByReference/javaField.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("propertyReceiverParameter.kt")
|
||||
public void testPropertyReceiverParameter() throws Exception {
|
||||
|
||||
+6
@@ -64,6 +64,12 @@ public class FirStandaloneNormalAnalysisSourceModuleMemberScopeByFqNameTestGener
|
||||
runTest("analysis/analysis-api/testData/scopes/memberScopeByFqName/Int.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("javaFieldClash.kt")
|
||||
public void testJavaFieldClash() throws Exception {
|
||||
runTest("analysis/analysis-api/testData/scopes/memberScopeByFqName/javaFieldClash.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("java.lang.String.kt")
|
||||
public void testJava_lang_String() throws Exception {
|
||||
|
||||
+6
@@ -88,6 +88,12 @@ public class FirStandaloneNormalAnalysisSourceModuleSymbolByReferenceTestGenerat
|
||||
runTest("analysis/analysis-api/testData/symbols/symbolByReference/implicitLambdaParameter.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("javaField.kt")
|
||||
public void testJavaField() throws Exception {
|
||||
runTest("analysis/analysis-api/testData/symbols/symbolByReference/javaField.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("propertyReceiverParameter.kt")
|
||||
public void testPropertyReceiverParameter() throws Exception {
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
// class: JavaClass
|
||||
// DO_NOT_CHECK_SYMBOL_RESTORE
|
||||
// FILE: main.kt
|
||||
|
||||
// FILE: JavaClass.java
|
||||
public class JavaClass {
|
||||
public int field = 1;
|
||||
public String field = "S";
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
open var field: kotlin.Int
|
||||
|
||||
open var field: kotlin.String!
|
||||
|
||||
open operator fun equals(other: kotlin.Any?): kotlin.Boolean
|
||||
|
||||
open fun hashCode(): kotlin.Int
|
||||
|
||||
open fun toString(): kotlin.String
|
||||
|
||||
constructor()
|
||||
+156
@@ -0,0 +1,156 @@
|
||||
KtJavaFieldSymbol:
|
||||
annotationsList: []
|
||||
callableIdIfNonLocal: /JavaClass.field
|
||||
contextReceivers: []
|
||||
isExtension: false
|
||||
isStatic: false
|
||||
isVal: false
|
||||
modality: OPEN
|
||||
name: field
|
||||
origin: JAVA
|
||||
receiverType: null
|
||||
returnType: kotlin/Int
|
||||
symbolKind: CLASS_MEMBER
|
||||
typeParameters: []
|
||||
visibility: Public
|
||||
getDispatchReceiver(): JavaClass
|
||||
getContainingModule: KtSourceModule "Sources of main"
|
||||
deprecationStatus: null
|
||||
|
||||
KtJavaFieldSymbol:
|
||||
annotationsList: []
|
||||
callableIdIfNonLocal: /JavaClass.field
|
||||
contextReceivers: []
|
||||
isExtension: false
|
||||
isStatic: false
|
||||
isVal: false
|
||||
modality: OPEN
|
||||
name: field
|
||||
origin: JAVA
|
||||
receiverType: null
|
||||
returnType: kotlin/String!
|
||||
symbolKind: CLASS_MEMBER
|
||||
typeParameters: []
|
||||
visibility: Public
|
||||
getDispatchReceiver(): JavaClass
|
||||
getContainingModule: KtSourceModule "Sources of main"
|
||||
deprecationStatus: null
|
||||
|
||||
KtFunctionSymbol:
|
||||
annotationsList: []
|
||||
callableIdIfNonLocal: kotlin/Any.equals
|
||||
contextReceivers: []
|
||||
hasStableParameterNames: true
|
||||
isBuiltinFunctionInvoke: false
|
||||
isExtension: false
|
||||
isExternal: false
|
||||
isInfix: false
|
||||
isInline: false
|
||||
isOperator: true
|
||||
isOverride: false
|
||||
isStatic: false
|
||||
isSuspend: false
|
||||
modality: OPEN
|
||||
name: equals
|
||||
origin: LIBRARY
|
||||
receiverType: null
|
||||
returnType: kotlin/Boolean
|
||||
symbolKind: CLASS_MEMBER
|
||||
typeParameters: []
|
||||
valueParameters: [
|
||||
KtValueParameterSymbol:
|
||||
annotationsList: []
|
||||
callableIdIfNonLocal: null
|
||||
contextReceivers: []
|
||||
generatedPrimaryConstructorProperty: null
|
||||
hasDefaultValue: false
|
||||
isCrossinline: false
|
||||
isExtension: false
|
||||
isImplicitLambdaParameter: false
|
||||
isNoinline: false
|
||||
isVararg: false
|
||||
name: other
|
||||
origin: LIBRARY
|
||||
receiverType: null
|
||||
returnType: kotlin/Any?
|
||||
symbolKind: LOCAL
|
||||
typeParameters: []
|
||||
getContainingModule: KtBinaryModule "Builtins for JVM (1.8)"
|
||||
deprecationStatus: null
|
||||
]
|
||||
visibility: Public
|
||||
getDispatchReceiver(): kotlin/Any
|
||||
getContainingModule: KtBinaryModule "Builtins for JVM (1.8)"
|
||||
deprecationStatus: null
|
||||
|
||||
KtFunctionSymbol:
|
||||
annotationsList: []
|
||||
callableIdIfNonLocal: kotlin/Any.hashCode
|
||||
contextReceivers: []
|
||||
hasStableParameterNames: true
|
||||
isBuiltinFunctionInvoke: false
|
||||
isExtension: false
|
||||
isExternal: false
|
||||
isInfix: false
|
||||
isInline: false
|
||||
isOperator: false
|
||||
isOverride: false
|
||||
isStatic: false
|
||||
isSuspend: false
|
||||
modality: OPEN
|
||||
name: hashCode
|
||||
origin: LIBRARY
|
||||
receiverType: null
|
||||
returnType: kotlin/Int
|
||||
symbolKind: CLASS_MEMBER
|
||||
typeParameters: []
|
||||
valueParameters: []
|
||||
visibility: Public
|
||||
getDispatchReceiver(): kotlin/Any
|
||||
getContainingModule: KtBinaryModule "Builtins for JVM (1.8)"
|
||||
deprecationStatus: null
|
||||
|
||||
KtFunctionSymbol:
|
||||
annotationsList: []
|
||||
callableIdIfNonLocal: kotlin/Any.toString
|
||||
contextReceivers: []
|
||||
hasStableParameterNames: true
|
||||
isBuiltinFunctionInvoke: false
|
||||
isExtension: false
|
||||
isExternal: false
|
||||
isInfix: false
|
||||
isInline: false
|
||||
isOperator: false
|
||||
isOverride: false
|
||||
isStatic: false
|
||||
isSuspend: false
|
||||
modality: OPEN
|
||||
name: toString
|
||||
origin: LIBRARY
|
||||
receiverType: null
|
||||
returnType: kotlin/String
|
||||
symbolKind: CLASS_MEMBER
|
||||
typeParameters: []
|
||||
valueParameters: []
|
||||
visibility: Public
|
||||
getDispatchReceiver(): kotlin/Any
|
||||
getContainingModule: KtBinaryModule "Builtins for JVM (1.8)"
|
||||
deprecationStatus: null
|
||||
|
||||
KtConstructorSymbol:
|
||||
annotationsList: []
|
||||
callableIdIfNonLocal: null
|
||||
containingClassIdIfNonLocal: JavaClass
|
||||
contextReceivers: []
|
||||
hasStableParameterNames: false
|
||||
isExtension: false
|
||||
isPrimary: true
|
||||
origin: JAVA
|
||||
receiverType: null
|
||||
returnType: JavaClass
|
||||
symbolKind: CLASS_MEMBER
|
||||
typeParameters: []
|
||||
valueParameters: []
|
||||
visibility: Public
|
||||
getContainingModule: KtSourceModule "Sources of main"
|
||||
deprecationStatus: null
|
||||
+1
@@ -0,0 +1 @@
|
||||
var field: kotlin.Int
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
KtJavaFieldSymbol:
|
||||
annotationsList: []
|
||||
callableIdIfNonLocal: /JavaClass.field
|
||||
contextReceivers: []
|
||||
isExtension: false
|
||||
isStatic: false
|
||||
isVal: false
|
||||
modality: FINAL
|
||||
name: field
|
||||
origin: JAVA
|
||||
receiverType: null
|
||||
returnType: kotlin/Int
|
||||
symbolKind: CLASS_MEMBER
|
||||
typeParameters: []
|
||||
visibility: Public
|
||||
getDispatchReceiver(): JavaClass
|
||||
getContainingModule: KtSourceModule "Sources of main"
|
||||
deprecationStatus: null
|
||||
@@ -0,0 +1,11 @@
|
||||
// DO_NOT_CHECK_SYMBOL_RESTORE_K1
|
||||
// FILE: main.kt
|
||||
fun some() {
|
||||
val jClass = JavaClass()
|
||||
jClass.<caret>field;
|
||||
}
|
||||
|
||||
// FILE: JavaClass.java
|
||||
public class JavaClass {
|
||||
public int field = 1;
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
open var field: kotlin.Int
|
||||
@@ -0,0 +1,18 @@
|
||||
KtJavaFieldSymbol:
|
||||
annotationsList: []
|
||||
callableIdIfNonLocal: /JavaClass.field
|
||||
contextReceivers: []
|
||||
isExtension: false
|
||||
isStatic: false
|
||||
isVal: false
|
||||
modality: OPEN
|
||||
name: field
|
||||
origin: JAVA
|
||||
receiverType: null
|
||||
returnType: kotlin/Int
|
||||
symbolKind: CLASS_MEMBER
|
||||
typeParameters: []
|
||||
visibility: Public
|
||||
getDispatchReceiver(): JavaClass
|
||||
getContainingModule: KtSourceModule "Sources of main"
|
||||
deprecationStatus: null
|
||||
Reference in New Issue
Block a user