JVM IR: add isInlineClassType, use it instead of isInlined

This commit is contained in:
Alexander Udalov
2021-03-24 22:31:12 +01:00
parent 770401801b
commit c17b6c59f8
18 changed files with 83 additions and 19 deletions
@@ -24,6 +24,7 @@ import com.intellij.mock.MockProject
import com.intellij.openapi.project.Project
import org.jetbrains.kotlin.backend.common.extensions.IrGenerationExtension
import org.jetbrains.kotlin.backend.common.extensions.IrPluginContext
import org.jetbrains.kotlin.backend.jvm.ir.isInlineClassType
import org.jetbrains.kotlin.compiler.plugin.ComponentRegistrar
import org.jetbrains.kotlin.config.CompilerConfiguration
import org.jetbrains.kotlin.ir.IrStatement
@@ -41,7 +42,6 @@ import org.jetbrains.kotlin.ir.types.IrType
import org.jetbrains.kotlin.ir.types.isPrimitiveType
import org.jetbrains.kotlin.ir.types.makeNullable
import org.jetbrains.kotlin.ir.util.hasDefaultValue
import org.jetbrains.kotlin.ir.util.isInlined
import org.jetbrains.kotlin.ir.util.statements
import org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid
import org.jetbrains.kotlin.ir.visitors.transformChildrenVoid
@@ -207,7 +207,7 @@ class ComposeLikeDefaultArgumentRewriter(
val type = param.type
return when {
type.isPrimitiveType() -> type
type.isInlined() -> type
type.isInlineClassType() -> type
else -> type.makeNullable()
}
}