diff options
Diffstat (limited to 'plugins/base/src')
-rw-r--r-- | plugins/base/src/main/kotlin/signatures/JvmSignatureUtils.kt | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/plugins/base/src/main/kotlin/signatures/JvmSignatureUtils.kt b/plugins/base/src/main/kotlin/signatures/JvmSignatureUtils.kt index 0defc69e..f934faa5 100644 --- a/plugins/base/src/main/kotlin/signatures/JvmSignatureUtils.kt +++ b/plugins/base/src/main/kotlin/signatures/JvmSignatureUtils.kt @@ -136,9 +136,11 @@ interface JvmSignatureUtils { || it.dri == DRI("java.lang", "Deprecated") } == true) setOf(TextStyle.Strikethrough) else emptySet() - infix fun DFunction.uses(t: DTypeParameter): Boolean = - t.dri in (listOfNotNull(receiver?.type?.drisOfAllNestedBounds, receiver?.dri) + + infix fun DFunction.uses(t: DTypeParameter): Boolean { + val allDris: List<DRI> = (listOfNotNull(receiver?.dri, *receiver?.type?.drisOfAllNestedBounds?.toTypedArray() ?: emptyArray()) + parameters.flatMap { listOf(it.dri) + it.type.drisOfAllNestedBounds }) + return t.dri in allDris + } } sealed class AtStrategy |