From 154dfc5f2b3c712678c43017effb34c322c983d1 Mon Sep 17 00:00:00 2001 From: SirYwell Date: Thu, 23 May 2024 15:51:55 +0200 Subject: [PATCH] avoid returns in returns --- .../kotlin/de/sirywell/methodhandleplugin/type/Type.kt | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/main/kotlin/de/sirywell/methodhandleplugin/type/Type.kt b/src/main/kotlin/de/sirywell/methodhandleplugin/type/Type.kt index 2da90a0..0eaf475 100644 --- a/src/main/kotlin/de/sirywell/methodhandleplugin/type/Type.kt +++ b/src/main/kotlin/de/sirywell/methodhandleplugin/type/Type.kt @@ -44,13 +44,8 @@ data class DirectType(val psiType: PsiType) : Type { return when (other) { is BotType -> this is TopType -> other - is DirectType -> { - if (other.psiType == psiType) { - return this - } else { - return TopType - } - } + is DirectType -> if (other.psiType == psiType) this else TopType + } }