Skip to content

Commit de55f65

Browse files
committed
Remove redundant class type calculation
1 parent 327fd27 commit de55f65

File tree

1 file changed

+1
-3
lines changed
  • seskar/seskar-compiler-plugin/src/main/kotlin/seskar/compiler/common/backend

1 file changed

+1
-3
lines changed

seskar/seskar-compiler-plugin/src/main/kotlin/seskar/compiler/common/backend/JsAnnotations.kt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import org.jetbrains.kotlin.backend.common.extensions.IrPluginContext
44
import org.jetbrains.kotlin.ir.UNDEFINED_OFFSET
55
import org.jetbrains.kotlin.ir.expressions.IrConstructorCall
66
import org.jetbrains.kotlin.ir.expressions.impl.IrConstructorCallImpl
7-
import org.jetbrains.kotlin.ir.types.defaultType
87
import org.jetbrains.kotlin.name.ClassId
98
import org.jetbrains.kotlin.name.FqName
109
import org.jetbrains.kotlin.name.Name
@@ -59,12 +58,11 @@ internal fun annotation(
5958
classId: ClassId,
6059
vararg parameters: String,
6160
): IrConstructorCall {
62-
val type = context.referenceClass(classId)!!.defaultType
6361
val symbol = context.referenceConstructors(classId).single()
6462
val annotation = IrConstructorCallImpl(
6563
startOffset = UNDEFINED_OFFSET,
6664
endOffset = UNDEFINED_OFFSET,
67-
type = type,
65+
type = symbol.owner.returnType,
6866
symbol = symbol,
6967
typeArgumentsCount = 0,
7068
constructorTypeArgumentsCount = 0,

0 commit comments

Comments
 (0)