[IR] Drop ReturnTypeIsNotInitializedException

It was unused since commit a005f2e75d.
This commit is contained in:
Wojciech Litewka
2024-03-07 11:41:57 +01:00
committed by Space Team
parent a53ba8a47b
commit 392fa8f9bd
2 changed files with 2 additions and 8 deletions
@@ -47,11 +47,6 @@ val IrType.originalKotlinType: KotlinType?
data object IrStarProjectionImpl : IrStarProjection data object IrStarProjectionImpl : IrStarProjection
internal class ReturnTypeIsNotInitializedException(function: IrFunction) : IllegalStateException(
"Return type is not initialized for function '${function.name}'"
)
// Please note this type is not denotable which means it could only exist inside type system // Please note this type is not denotable which means it could only exist inside type system
class IrCapturedType( class IrCapturedType(
val captureStatus: CaptureStatus, val captureStatus: CaptureStatus,
@@ -1,5 +1,5 @@
/* /*
* Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors. * Copyright 2010-2024 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/ */
@@ -14,7 +14,6 @@ import org.jetbrains.kotlin.ir.declarations.*
import org.jetbrains.kotlin.ir.expressions.* import org.jetbrains.kotlin.ir.expressions.*
import org.jetbrains.kotlin.ir.symbols.* import org.jetbrains.kotlin.ir.symbols.*
import org.jetbrains.kotlin.ir.types.* import org.jetbrains.kotlin.ir.types.*
import org.jetbrains.kotlin.ir.types.impl.ReturnTypeIsNotInitializedException
import org.jetbrains.kotlin.ir.types.impl.originalKotlinType import org.jetbrains.kotlin.ir.types.impl.originalKotlinType
import org.jetbrains.kotlin.ir.visitors.IrElementVisitor import org.jetbrains.kotlin.ir.visitors.IrElementVisitor
import org.jetbrains.kotlin.renderer.DescriptorRenderer import org.jetbrains.kotlin.renderer.DescriptorRenderer
@@ -743,7 +742,7 @@ private fun IrFunction.renderTypeParameters(): String =
private val IrFunction.safeReturnType: IrType? private val IrFunction.safeReturnType: IrType?
get() = try { get() = try {
returnType returnType
} catch (e: ReturnTypeIsNotInitializedException) { } catch (e: UninitializedPropertyAccessException) {
null null
} }