[AA K2] add more tests on java members
^KT-54311
This commit is contained in:
committed by
Space Team
parent
5e31c0b9b0
commit
731545573a
+12
@@ -64,12 +64,24 @@ public class FirIdeNormalAnalysisSourceModuleMemberScopeByFqNameTestGenerated ex
|
||||
runTest("analysis/analysis-api/testData/scopes/memberScopeByFqName/Int.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("javaField.kt")
|
||||
public void testJavaField() throws Exception {
|
||||
runTest("analysis/analysis-api/testData/scopes/memberScopeByFqName/javaField.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("javaFieldClash.kt")
|
||||
public void testJavaFieldClash() throws Exception {
|
||||
runTest("analysis/analysis-api/testData/scopes/memberScopeByFqName/javaFieldClash.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("javaMethods.kt")
|
||||
public void testJavaMethods() throws Exception {
|
||||
runTest("analysis/analysis-api/testData/scopes/memberScopeByFqName/javaMethods.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("java.lang.String.kt")
|
||||
public void testJava_lang_String() throws Exception {
|
||||
|
||||
+12
@@ -64,12 +64,24 @@ public class FirStandaloneNormalAnalysisSourceModuleMemberScopeByFqNameTestGener
|
||||
runTest("analysis/analysis-api/testData/scopes/memberScopeByFqName/Int.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("javaField.kt")
|
||||
public void testJavaField() throws Exception {
|
||||
runTest("analysis/analysis-api/testData/scopes/memberScopeByFqName/javaField.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("javaFieldClash.kt")
|
||||
public void testJavaFieldClash() throws Exception {
|
||||
runTest("analysis/analysis-api/testData/scopes/memberScopeByFqName/javaFieldClash.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("javaMethods.kt")
|
||||
public void testJavaMethods() throws Exception {
|
||||
runTest("analysis/analysis-api/testData/scopes/memberScopeByFqName/javaMethods.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("java.lang.String.kt")
|
||||
public void testJava_lang_String() throws Exception {
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
// class: JavaClass
|
||||
// FILE: main.kt
|
||||
|
||||
// FILE: JavaClass.java
|
||||
public class JavaClass {
|
||||
public int field = 1;
|
||||
public String field2 = "S";
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
open var field: kotlin.Int
|
||||
|
||||
open var field2: kotlin.String!
|
||||
|
||||
open operator fun equals(other: kotlin.Any?): kotlin.Boolean
|
||||
|
||||
open fun hashCode(): kotlin.Int
|
||||
|
||||
open fun toString(): kotlin.String
|
||||
|
||||
constructor()
|
||||
@@ -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.field2
|
||||
contextReceivers: []
|
||||
isExtension: false
|
||||
isStatic: false
|
||||
isVal: false
|
||||
modality: OPEN
|
||||
name: field2
|
||||
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
|
||||
@@ -0,0 +1,17 @@
|
||||
// class: JavaClass
|
||||
// FILE: main.kt
|
||||
|
||||
// FILE: JavaClass.java
|
||||
public class JavaClass {
|
||||
public void foo() {
|
||||
|
||||
}
|
||||
|
||||
public String doo(int i) {
|
||||
return "";
|
||||
}
|
||||
|
||||
public String getStringValue() {
|
||||
return "";
|
||||
}
|
||||
}
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
open fun foo()
|
||||
|
||||
open fun doo(i: kotlin.Int): kotlin.String!
|
||||
|
||||
open fun getStringValue(): kotlin.String!
|
||||
|
||||
open operator fun equals(other: kotlin.Any?): kotlin.Boolean
|
||||
|
||||
open fun hashCode(): kotlin.Int
|
||||
|
||||
open fun toString(): kotlin.String
|
||||
|
||||
constructor()
|
||||
@@ -0,0 +1,219 @@
|
||||
KtFunctionSymbol:
|
||||
annotationsList: []
|
||||
callableIdIfNonLocal: /JavaClass.foo
|
||||
contextReceivers: []
|
||||
hasStableParameterNames: false
|
||||
isBuiltinFunctionInvoke: false
|
||||
isExtension: false
|
||||
isExternal: false
|
||||
isInfix: false
|
||||
isInline: false
|
||||
isOperator: false
|
||||
isOverride: false
|
||||
isStatic: false
|
||||
isSuspend: false
|
||||
modality: OPEN
|
||||
name: foo
|
||||
origin: JAVA
|
||||
receiverType: null
|
||||
returnType: kotlin/Unit
|
||||
symbolKind: CLASS_MEMBER
|
||||
typeParameters: []
|
||||
valueParameters: []
|
||||
visibility: Public
|
||||
getDispatchReceiver(): JavaClass
|
||||
getContainingModule: KtSourceModule "Sources of main"
|
||||
deprecationStatus: null
|
||||
|
||||
KtFunctionSymbol:
|
||||
annotationsList: []
|
||||
callableIdIfNonLocal: /JavaClass.doo
|
||||
contextReceivers: []
|
||||
hasStableParameterNames: false
|
||||
isBuiltinFunctionInvoke: false
|
||||
isExtension: false
|
||||
isExternal: false
|
||||
isInfix: false
|
||||
isInline: false
|
||||
isOperator: false
|
||||
isOverride: false
|
||||
isStatic: false
|
||||
isSuspend: false
|
||||
modality: OPEN
|
||||
name: doo
|
||||
origin: JAVA
|
||||
receiverType: null
|
||||
returnType: kotlin/String!
|
||||
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: i
|
||||
origin: JAVA
|
||||
receiverType: null
|
||||
returnType: kotlin/Int
|
||||
symbolKind: LOCAL
|
||||
typeParameters: []
|
||||
getContainingModule: KtSourceModule "Sources of main"
|
||||
deprecationStatus: null
|
||||
]
|
||||
visibility: Public
|
||||
getDispatchReceiver(): JavaClass
|
||||
getContainingModule: KtSourceModule "Sources of main"
|
||||
deprecationStatus: null
|
||||
|
||||
KtFunctionSymbol:
|
||||
annotationsList: []
|
||||
callableIdIfNonLocal: /JavaClass.getStringValue
|
||||
contextReceivers: []
|
||||
hasStableParameterNames: false
|
||||
isBuiltinFunctionInvoke: false
|
||||
isExtension: false
|
||||
isExternal: false
|
||||
isInfix: false
|
||||
isInline: false
|
||||
isOperator: false
|
||||
isOverride: false
|
||||
isStatic: false
|
||||
isSuspend: false
|
||||
modality: OPEN
|
||||
name: getStringValue
|
||||
origin: JAVA
|
||||
receiverType: null
|
||||
returnType: kotlin/String!
|
||||
symbolKind: CLASS_MEMBER
|
||||
typeParameters: []
|
||||
valueParameters: []
|
||||
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
|
||||
Reference in New Issue
Block a user