More actions logged in tests
This commit is contained in:
+7
@@ -407,6 +407,8 @@ private class Processor(
|
|||||||
if (method != null && method.hasModifierProperty(PsiModifier.ABSTRACT)) {
|
if (method != null && method.hasModifierProperty(PsiModifier.ABSTRACT)) {
|
||||||
val psiClass = method.containingClass
|
val psiClass = method.containingClass
|
||||||
if (psiClass != null) {
|
if (psiClass != null) {
|
||||||
|
testLog?.add("Resolved to java class to descriptor: ${psiClass.qualifiedName}")
|
||||||
|
|
||||||
val classDescriptor = psiClass.resolveToDescriptor(target.getResolutionFacade())
|
val classDescriptor = psiClass.resolveToDescriptor(target.getResolutionFacade())
|
||||||
if (classDescriptor != null && SingleAbstractMethodUtils.getSingleAbstractMethodOrNull(classDescriptor) != null) {
|
if (classDescriptor != null && SingleAbstractMethodUtils.getSingleAbstractMethodOrNull(classDescriptor) != null) {
|
||||||
addSamInterfaceToProcess(psiClass)
|
addSamInterfaceToProcess(psiClass)
|
||||||
@@ -491,6 +493,8 @@ private class Processor(
|
|||||||
private fun processSuspiciousDeclaration(declaration: KtDeclaration) {
|
private fun processSuspiciousDeclaration(declaration: KtDeclaration) {
|
||||||
if (declaration is KtDestructuringDeclaration) {
|
if (declaration is KtDestructuringDeclaration) {
|
||||||
if (searchScope.contains(declaration)) {
|
if (searchScope.contains(declaration)) {
|
||||||
|
testLog?.add("Checked type of ${declaration.logPresentation()}")
|
||||||
|
|
||||||
val declarationReference = declaration.references.firstIsInstance<KtDestructuringDeclarationReference>()
|
val declarationReference = declaration.references.firstIsInstance<KtDestructuringDeclarationReference>()
|
||||||
if (declarationReference.isReferenceTo(target)) {
|
if (declarationReference.isReferenceTo(target)) {
|
||||||
consumer.process(declarationReference)
|
consumer.process(declarationReference)
|
||||||
@@ -500,6 +504,8 @@ private class Processor(
|
|||||||
else {
|
else {
|
||||||
if (!isImplicitlyTyped(declaration)) return
|
if (!isImplicitlyTyped(declaration)) return
|
||||||
|
|
||||||
|
testLog?.add("Checked type of ${declaration.logPresentation()}")
|
||||||
|
|
||||||
val descriptor = declaration.resolveToDescriptorIfAny() as? CallableDescriptor ?: return
|
val descriptor = declaration.resolveToDescriptorIfAny() as? CallableDescriptor ?: return
|
||||||
val type = descriptor.returnType
|
val type = descriptor.returnType
|
||||||
if (type != null && type.containsTypeOrDerivedInside(dataType)) {
|
if (type != null && type.containsTypeOrDerivedInside(dataType)) {
|
||||||
@@ -586,6 +592,7 @@ private class Processor(
|
|||||||
val owner = this.ownerFunction?.logPresentation() ?: this.parent.toString()
|
val owner = this.ownerFunction?.logPresentation() ?: this.parent.toString()
|
||||||
"parameter ${this.name} in $owner"
|
"parameter ${this.name} in $owner"
|
||||||
}
|
}
|
||||||
|
is KtDestructuringDeclaration -> entries.joinToString(", ", prefix = "(", postfix = ")") { it.text }
|
||||||
else -> fqName
|
else -> fqName
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
Resolved to java class to descriptor: JavaSAM
|
||||||
Searched inheritors of pack.A
|
Searched inheritors of pack.A
|
||||||
Searched references to JavaClass.takeSAM() in Kotlin files
|
Searched references to JavaClass.takeSAM() in Kotlin files
|
||||||
Searched references to JavaSAM in java files
|
Searched references to JavaSAM in java files
|
||||||
|
|||||||
+2
@@ -1,3 +1,5 @@
|
|||||||
|
Checked type of (x, y)
|
||||||
|
Checked type of f()
|
||||||
Searched inheritors of X
|
Searched inheritors of X
|
||||||
Searched references to X
|
Searched references to X
|
||||||
Searched references to f() in Kotlin files
|
Searched references to f() in Kotlin files
|
||||||
|
|||||||
+3
@@ -1,3 +1,6 @@
|
|||||||
|
Checked type of (x1, y1)
|
||||||
|
Checked type of f()
|
||||||
|
Checked type of g()
|
||||||
Searched inheritors of X
|
Searched inheritors of X
|
||||||
Searched references to X
|
Searched references to X
|
||||||
Searched references to f() in Kotlin files
|
Searched references to f() in Kotlin files
|
||||||
|
|||||||
@@ -1,3 +1,14 @@
|
|||||||
|
Checked type of (x, y, z)
|
||||||
|
Checked type of (x1, y1, z1)
|
||||||
|
Checked type of (x2, y2, z2)
|
||||||
|
Checked type of (x3, y3, z3)
|
||||||
|
Checked type of (x4, y4, z4)
|
||||||
|
Checked type of (x5, y5, z5)
|
||||||
|
Checked type of a
|
||||||
|
Checked type of g()
|
||||||
|
Checked type of h()
|
||||||
|
Checked type of listOfA()
|
||||||
|
Checked type of listOfA()
|
||||||
Searched inheritors of pack.A
|
Searched inheritors of pack.A
|
||||||
Searched references to JavaClass.getA() in Kotlin files
|
Searched references to JavaClass.getA() in Kotlin files
|
||||||
Searched references to a in Kotlin files
|
Searched references to a in Kotlin files
|
||||||
|
|||||||
+2
@@ -1,3 +1,5 @@
|
|||||||
|
Checked type of (x, y, z)
|
||||||
|
Checked type of a
|
||||||
Searched inheritors of A
|
Searched inheritors of A
|
||||||
Searched references to A
|
Searched references to A
|
||||||
Searched references to a in Kotlin files
|
Searched references to a in Kotlin files
|
||||||
|
|||||||
+4
@@ -1,3 +1,7 @@
|
|||||||
|
Checked type of (a, n)
|
||||||
|
Checked type of (a1, n1)
|
||||||
|
Checked type of (x, y, z)
|
||||||
|
Checked type of (x1, y1, z1)
|
||||||
Searched inheritors of A
|
Searched inheritors of A
|
||||||
Searched inheritors of B
|
Searched inheritors of B
|
||||||
Searched inheritors of C
|
Searched inheritors of C
|
||||||
|
|||||||
+2
@@ -1,3 +1,5 @@
|
|||||||
|
Checked type of (x, y)
|
||||||
|
Checked type of f()
|
||||||
Searched inheritors of X
|
Searched inheritors of X
|
||||||
Searched references to X
|
Searched references to X
|
||||||
Searched references to Y
|
Searched references to Y
|
||||||
|
|||||||
@@ -1,3 +1,6 @@
|
|||||||
|
Checked type of (x, y)
|
||||||
|
Checked type of (x, y, z)
|
||||||
|
Checked type of parameter a in FOR
|
||||||
Searched inheritors of A
|
Searched inheritors of A
|
||||||
Searched references to A
|
Searched references to A
|
||||||
Searched references to parameter a in FOR in Kotlin files
|
Searched references to parameter a in FOR in Kotlin files
|
||||||
|
|||||||
@@ -1,3 +1,6 @@
|
|||||||
|
Checked type of (x, y)
|
||||||
|
Checked type of (x1, y1)
|
||||||
|
Checked type of list
|
||||||
Searched inheritors of A
|
Searched inheritors of A
|
||||||
Searched references to A
|
Searched references to A
|
||||||
Searched references to list in Kotlin files
|
Searched references to list in Kotlin files
|
||||||
|
|||||||
@@ -1,3 +1,9 @@
|
|||||||
|
Checked type of (x, y)
|
||||||
|
Checked type of (x1, y1)
|
||||||
|
Checked type of (x2, y2)
|
||||||
|
Checked type of f()
|
||||||
|
Checked type of g()
|
||||||
|
Checked type of h()
|
||||||
Searched inheritors of X
|
Searched inheritors of X
|
||||||
Searched references to X
|
Searched references to X
|
||||||
Searched references to Y
|
Searched references to Y
|
||||||
|
|||||||
Reference in New Issue
Block a user