From b9a1b3380a0bb8a64f3c7f257374cd4a6b2f3cfe Mon Sep 17 00:00:00 2001 From: Andrzej Ratajczak Date: Thu, 20 Aug 2020 13:59:58 +0200 Subject: Fix requested bugfixes --- plugins/base/src/main/kotlin/signatures/JvmSignatureUtils.kt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'plugins/base') 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 = (listOfNotNull(receiver?.dri, *receiver?.type?.drisOfAllNestedBounds?.toTypedArray() ?: emptyArray()) + parameters.flatMap { listOf(it.dri) + it.type.drisOfAllNestedBounds }) + return t.dri in allDris + } } sealed class AtStrategy -- cgit