JetBrains / compose-multiplatform

Compose Multiplatform, a modern UI framework for Kotlin that makes building performant and beautiful user interfaces easy and enjoyable.
https://jetbrains.com/lp/compose-multiplatform
Apache License 2.0
16.2k stars 1.17k forks source link

Calling crossinline function inside @Composable cause compiler to fail #2405

Closed David-Zhubrev closed 1 month ago

David-Zhubrev commented 2 years ago

I'm trying to implement this composable with ComposeMultiplatform:

@Composable
inline fun <reified T> ListSetting(
    setting: ListSetting<T>,
    crossinline onNewElement: () -> T,
    modifier: Modifier = Modifier,
    crossinline elementContent: @Composable (T) -> Unit,
) {
    Box(modifier) {
        Text(setting.name.value)
        val settingValues = remember { mutableStateListOf(*setting.value.toTypedArray()) }
        val state = rememberLazyListState()
        val adapter = rememberScrollbarAdapter(state)
        LazyColumn {
            items(settingValues) {
                Row(verticalAlignment = Alignment.CenterVertically) {
                    elementContent(it)
                    TextButton({ settingValues.remove(it) }) {
                        Text(Strings.REMOVE.value)
                    }
                }
            }
        }
        VerticalScrollbar(adapter, modifier = Modifier.fillMaxHeight().align(Alignment.CenterEnd))
        TextButton({
            settingValues.add(onNewElement())
        }, modifier = Modifier.align(Alignment.BottomEnd)) {
            Text(Strings.ADD.value)
        }
    }
}

And here is an example of calling this function:

@Composable
fun SettingsScreen() {
    Column(Modifier.fillMaxSize().padding(32.dp)) {
        ListSetting(
            ServerSetting,
            onNewElement = { UploadServer("", "", "") }
        ) { Text("Sample text") }
    }
}

This method makes compiler to fail during :desktop:compileKotlinJvm task. Commenting out crossinline function calls leads to successful compilation and run. Commenting out one of them doesn't make this right, so that seems to be an issue for all crossinline functions, no matter if they are marked as Composable or not.

Kotlin version: 1.7.10 Compose version 1.2.0

Here is a build output:

Build output ``` org.jetbrains.kotlin.backend.common.BackendException: Backend Internal error: Exception during IR lowering File being compiled: C:/Users/Guest/IntelliJIDEAProjects/epg-elevator/desktop/src/jvmMain/kotlin/ui/root/settings/SettingsScreen.kt The root cause java.lang.RuntimeException was thrown at: org.jetbrains.kotlin.backend.jvm.codegen.FunctionCodegen.generate(FunctionCodegen.kt:50) at org.jetbrains.kotlin.backend.common.CodegenUtil.reportBackendException(CodegenUtil.kt:239) at org.jetbrains.kotlin.backend.common.CodegenUtil.reportBackendException$default(CodegenUtil.kt:235) at org.jetbrains.kotlin.backend.common.phaser.PerformByIrFilePhase.invokeSequential(performByIrFile.kt:68) at org.jetbrains.kotlin.backend.common.phaser.PerformByIrFilePhase.invoke(performByIrFile.kt:55) at org.jetbrains.kotlin.backend.common.phaser.PerformByIrFilePhase.invoke(performByIrFile.kt:41) at org.jetbrains.kotlin.backend.common.phaser.NamedCompilerPhase.invoke(CompilerPhase.kt:96) at org.jetbrains.kotlin.backend.common.phaser.CompositePhase.invoke(PhaseBuilders.kt:29) at org.jetbrains.kotlin.backend.common.phaser.NamedCompilerPhase.invoke(CompilerPhase.kt:96) at org.jetbrains.kotlin.backend.common.phaser.CompilerPhaseKt.invokeToplevel(CompilerPhase.kt:43) at org.jetbrains.kotlin.backend.jvm.JvmIrCodegenFactory.invokeCodegen(JvmIrCodegenFactory.kt:284) at org.jetbrains.kotlin.cli.jvm.compiler.KotlinToJVMBytecodeCompiler.runCodegen(KotlinToJVMBytecodeCompiler.kt:355) at org.jetbrains.kotlin.cli.jvm.compiler.KotlinToJVMBytecodeCompiler.compileModules$cli(KotlinToJVMBytecodeCompiler.kt:136) at org.jetbrains.kotlin.cli.jvm.compiler.KotlinToJVMBytecodeCompiler.compileModules$cli$default(KotlinToJVMBytecodeCompiler.kt:60) at org.jetbrains.kotlin.cli.jvm.K2JVMCompiler.doExecute(K2JVMCompiler.kt:157) at org.jetbrains.kotlin.cli.jvm.K2JVMCompiler.doExecute(K2JVMCompiler.kt:52) at org.jetbrains.kotlin.cli.common.CLICompiler.execImpl(CLICompiler.kt:94) at org.jetbrains.kotlin.cli.common.CLICompiler.execImpl(CLICompiler.kt:43) at org.jetbrains.kotlin.cli.common.CLITool.exec(CLITool.kt:101) at org.jetbrains.kotlin.incremental.IncrementalJvmCompilerRunner.runCompiler(IncrementalJvmCompilerRunner.kt:477) at org.jetbrains.kotlin.incremental.IncrementalJvmCompilerRunner.runCompiler(IncrementalJvmCompilerRunner.kt:127) at org.jetbrains.kotlin.incremental.IncrementalCompilerRunner.compileIncrementally(IncrementalCompilerRunner.kt:366) at org.jetbrains.kotlin.incremental.IncrementalCompilerRunner.compileIncrementally$default(IncrementalCompilerRunner.kt:311) at org.jetbrains.kotlin.incremental.IncrementalCompilerRunner.rebuild(IncrementalCompilerRunner.kt:110) at org.jetbrains.kotlin.incremental.IncrementalCompilerRunner.compileImpl(IncrementalCompilerRunner.kt:200) at org.jetbrains.kotlin.incremental.IncrementalCompilerRunner.compile(IncrementalCompilerRunner.kt:75) at org.jetbrains.kotlin.daemon.CompileServiceImplBase.execIncrementalCompiler(CompileServiceImpl.kt:625) at org.jetbrains.kotlin.daemon.CompileServiceImplBase.access$execIncrementalCompiler(CompileServiceImpl.kt:101) at org.jetbrains.kotlin.daemon.CompileServiceImpl.compile(CompileServiceImpl.kt:1739) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:568) at java.rmi/sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:360) at java.rmi/sun.rmi.transport.Transport$1.run(Transport.java:200) at java.rmi/sun.rmi.transport.Transport$1.run(Transport.java:197) at java.base/java.security.AccessController.doPrivileged(AccessController.java:712) at java.rmi/sun.rmi.transport.Transport.serviceCall(Transport.java:196) at java.rmi/sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:587) at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:828) at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$0(TCPTransport.java:705) at java.base/java.security.AccessController.doPrivileged(AccessController.java:399) at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:704) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) at java.base/java.lang.Thread.run(Thread.java:833) Caused by: java.lang.RuntimeException: Exception while generating code for: FUN name:SettingsScreen visibility:public modality:FINAL <> ($composer:androidx.compose.runtime.Composer?, $changed:kotlin.Int) returnType:kotlin.Unit annotations: Composable ComposableTarget(applier = 'androidx.compose.ui.UiComposable') VALUE_PARAMETER name:$composer index:0 type:androidx.compose.runtime.Composer? [assignable] VALUE_PARAMETER name:$changed index:1 type:kotlin.Int BLOCK_BODY BLOCK type=kotlin.Unit origin=null SET_VAR '$composer: androidx.compose.runtime.Composer? [assignable] declared in ui.root.settings.SettingsScreenKt.SettingsScreen' type=kotlin.Unit origin=null CALL 'public abstract fun startRestartGroup (key: kotlin.Int): androidx.compose.runtime.Composer declared in androidx.compose.runtime.Composer' type=androidx.compose.runtime.Composer origin=null $this: GET_VAR '$composer: androidx.compose.runtime.Composer? [assignable] declared in ui.root.settings.SettingsScreenKt.SettingsScreen' type=androidx.compose.runtime.Composer? origin=null key: CONST Int type=kotlin.Int value=-1918834685 CALL 'public final fun sourceInformation (composer: androidx.compose.runtime.Composer, sourceInformation: kotlin.String): kotlin.Unit declared in androidx.compose.runtime.ComposerKt' type=kotlin.Unit origin=null composer: GET_VAR '$composer: androidx.compose.runtime.Composer? [assignable] declared in ui.root.settings.SettingsScreenKt.SettingsScreen' type=androidx.compose.runtime.Composer? origin=null sourceInformation: CONST String type=kotlin.String value="C(SettingsScreen)" WHEN type=kotlin.Unit origin=IF BRANCH if: CALL 'public final fun OROR (arg0: kotlin.Boolean, arg1: kotlin.Boolean): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=null arg0: CALL 'public final fun not (): kotlin.Boolean [operator] declared in kotlin.Boolean' type=kotlin.Boolean origin=null $this: CALL 'public final fun EQEQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=null arg0: GET_VAR '$changed: kotlin.Int declared in ui.root.settings.SettingsScreenKt.SettingsScreen' type=kotlin.Int origin=null arg1: CONST Int type=kotlin.Int value=0 arg1: CALL 'public final fun not (): kotlin.Boolean [operator] declared in kotlin.Boolean' type=kotlin.Boolean origin=null $this: CALL 'public abstract fun (): kotlin.Boolean declared in androidx.compose.runtime.Composer' type=kotlin.Boolean origin=null $this: GET_VAR '$composer: androidx.compose.runtime.Composer? [assignable] declared in ui.root.settings.SettingsScreenKt.SettingsScreen' type=androidx.compose.runtime.Composer? origin=null then: BLOCK type=kotlin.Unit origin=null WHEN type=kotlin.Unit origin=IF BRANCH if: CALL 'public final fun isTraceInProgress (): kotlin.Boolean declared in androidx.compose.runtime.ComposerKt' type=kotlin.Boolean origin=null then: CALL 'public final fun traceEventStart (key: kotlin.Int, dirty1: kotlin.Int, dirty2: kotlin.Int, info: kotlin.String): kotlin.Unit declared in androidx.compose.runtime.ComposerKt' type=kotlin.Unit origin=null key: CONST Int type=kotlin.Int value=-1918834685 dirty1: GET_VAR '$changed: kotlin.Int declared in ui.root.settings.SettingsScreenKt.SettingsScreen' type=kotlin.Int origin=null dirty2: CONST Int type=kotlin.Int value=-1 info: CONST String type=kotlin.String value="ui.root.settings.SettingsScreen (SettingsScreen.kt:25)" CALL 'public final fun Column (modifier: androidx.compose.ui.Modifier?, verticalArrangement: androidx.compose.foundation.layout.Arrangement.Vertical?, horizontalAlignment: androidx.compose.ui.Alignment.Horizontal?, content: @[ExtensionFunctionType] kotlin.Function3, $composer: androidx.compose.runtime.Composer?, $changed: kotlin.Int, $default: kotlin.Int): kotlin.Unit [inline] declared in androidx.compose.foundation.layout.ColumnKt' type=kotlin.Unit origin=null modifier: CALL 'public final fun padding-3ABfNKs (all: androidx.compose.ui.unit.Dp): androidx.compose.ui.Modifier declared in androidx.compose.foundation.layout.PaddingKt' type=androidx.compose.ui.Modifier origin=null $receiver: CALL 'public final fun fillMaxSize$default (fraction: kotlin.Float, $mask0: kotlin.Int, $handler: kotlin.Any?): androidx.compose.ui.Modifier declared in androidx.compose.foundation.layout.SizeKt' type=androidx.compose.ui.Modifier origin=DEFAULT_DISPATCH_CALL $receiver: GET_FIELD 'FIELD FIELD_FOR_OBJECT_INSTANCE name:Companion type:androidx.compose.ui.Modifier.Companion visibility:public [final,static]' type=androidx.compose.ui.Modifier.Companion origin=null fraction: COMPOSITE type=kotlin.Float origin=DEFAULT_VALUE CONST Float type=kotlin.Float value=0.0 $mask0: CONST Int type=kotlin.Int value=1 $handler: CONST Null type=kotlin.Any? value=null all: CALL 'public final fun (): androidx.compose.ui.unit.Dp [inline] declared in androidx.compose.ui.unit.DpKt' type=androidx.compose.ui.unit.Dp origin=GET_PROPERTY $receiver: CONST Int type=kotlin.Int value=32 verticalArrangement: COMPOSITE type=kotlin.Nothing? origin=DEFAULT_VALUE CONST Null type=kotlin.Nothing? value=null horizontalAlignment: COMPOSITE type=kotlin.Nothing? origin=DEFAULT_VALUE CONST Null type=kotlin.Nothing? value=null content: BLOCK type=@[ExtensionFunctionType] kotlin.Function3 origin=LAMBDA COMPOSITE type=kotlin.Unit origin=null FUNCTION_REFERENCE 'private final fun SettingsScreen$lambda-2 ($composer: androidx.compose.runtime.Composer?, $changed: kotlin.Int): kotlin.Unit declared in ui.root.settings.SettingsScreenKt' type=@[ExtensionFunctionType] kotlin.Function3 origin=INLINE_LAMBDA reflectionTarget=null $composer: GET_VAR '$composer: androidx.compose.runtime.Composer? [assignable] declared in ui.root.settings.SettingsScreenKt.SettingsScreen' type=androidx.compose.runtime.Composer? origin=null $changed: CONST Int type=kotlin.Int value=6 $default: CONST Int type=kotlin.Int value=6 WHEN type=kotlin.Unit origin=IF BRANCH if: CALL 'public final fun isTraceInProgress (): kotlin.Boolean declared in androidx.compose.runtime.ComposerKt' type=kotlin.Boolean origin=null then: CALL 'public final fun traceEventEnd (): kotlin.Unit declared in androidx.compose.runtime.ComposerKt' type=kotlin.Unit origin=null BRANCH if: CONST Boolean type=kotlin.Boolean value=true then: CALL 'public abstract fun skipToGroupEnd (): kotlin.Unit declared in androidx.compose.runtime.Composer' type=kotlin.Unit origin=null $this: GET_VAR '$composer: androidx.compose.runtime.Composer? [assignable] declared in ui.root.settings.SettingsScreenKt.SettingsScreen' type=androidx.compose.runtime.Composer? origin=null BLOCK type=kotlin.Unit origin=null BLOCK type=kotlin.Unit origin=SAFE_CALL VAR IR_TEMPORARY_VARIABLE name:tmp0_safe_receiver type:androidx.compose.runtime.ScopeUpdateScope? [val] CALL 'public abstract fun endRestartGroup (): androidx.compose.runtime.ScopeUpdateScope? declared in androidx.compose.runtime.Composer' type=androidx.compose.runtime.ScopeUpdateScope? origin=null $this: GET_VAR '$composer: androidx.compose.runtime.Composer? [assignable] declared in ui.root.settings.SettingsScreenKt.SettingsScreen' type=androidx.compose.runtime.Composer? origin=null WHEN type=kotlin.Unit origin=IF BRANCH if: CALL 'public final fun EQEQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=null arg0: GET_VAR 'val tmp0_safe_receiver: androidx.compose.runtime.ScopeUpdateScope? [val] declared in ui.root.settings.SettingsScreenKt.SettingsScreen' type=androidx.compose.runtime.ScopeUpdateScope? origin=null arg1: CONST Null type=kotlin.Any? value=null then: CONST Null type=kotlin.Any? value=null BRANCH if: CONST Boolean type=kotlin.Boolean value=true then: CALL 'public abstract fun updateScope (block: kotlin.Function2): kotlin.Unit declared in androidx.compose.runtime.ScopeUpdateScope' type=kotlin.Unit origin=null $this: GET_VAR 'val tmp0_safe_receiver: androidx.compose.runtime.ScopeUpdateScope? [val] declared in ui.root.settings.SettingsScreenKt.SettingsScreen' type=androidx.compose.runtime.ScopeUpdateScope? origin=null block: BLOCK type=ui.root.settings.SettingsScreenKt.SettingsScreen. origin=null CLASS LAMBDA_IMPL CLASS name: modality:FINAL visibility:public/*package*/ superTypes:[kotlin.jvm.internal.Lambda; kotlin.Function2] $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:ui.root.settings.SettingsScreenKt.SettingsScreen. CONSTRUCTOR GENERATED_MEMBER_IN_CALLABLE_REFERENCE visibility:public/*package*/ <> ($$changed:kotlin.Int) returnType:ui.root.settings.SettingsScreenKt.SettingsScreen. [primary] VALUE_PARAMETER BOUND_VALUE_PARAMETER name:$$changed index:0 type:kotlin.Int BLOCK_BODY SET_FIELD 'FIELD FIELD_FOR_CAPTURED_VALUE name:$$changed type:kotlin.Int visibility:public/*package*/ [final]' type=kotlin.Unit origin=INITIALIZER_OF_FIELD_FOR_CAPTURED_VALUE receiver: GET_VAR ': ui.root.settings.SettingsScreenKt.SettingsScreen. declared in ui.root.settings.SettingsScreenKt.SettingsScreen.' type=ui.root.settings.SettingsScreenKt.SettingsScreen. origin=null value: GET_VAR '$$changed: kotlin.Int declared in ui.root.settings.SettingsScreenKt.SettingsScreen..' type=kotlin.Int origin=null DELEGATING_CONSTRUCTOR_CALL 'public constructor (arity: kotlin.Int) declared in kotlin.jvm.internal.Lambda' arity: CONST Int type=kotlin.Int value=2 BLOCK type=kotlin.Unit origin=null FUN name:invoke visibility:public modality:FINAL <> ($this:ui.root.settings.SettingsScreenKt.SettingsScreen., $composer:androidx.compose.runtime.Composer?, $force:kotlin.Int) returnType:kotlin.Unit overridden: public abstract fun invoke (p1: P1 of kotlin.Function2, p2: P2 of kotlin.Function2): R of kotlin.Function2 [operator] declared in kotlin.Function2 $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:ui.root.settings.SettingsScreenKt.SettingsScreen. VALUE_PARAMETER name:$composer index:0 type:androidx.compose.runtime.Composer? VALUE_PARAMETER name:$force index:1 type:kotlin.Int BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun invoke ($composer: androidx.compose.runtime.Composer?, $force: kotlin.Int): kotlin.Unit declared in ui.root.settings.SettingsScreenKt.SettingsScreen.' CALL 'public final fun SettingsScreen ($composer: androidx.compose.runtime.Composer?, $changed: kotlin.Int): kotlin.Unit declared in ui.root.settings.SettingsScreenKt' type=kotlin.Unit origin=null $composer: GET_VAR '$composer: androidx.compose.runtime.Composer? declared in ui.root.settings.SettingsScreenKt.SettingsScreen..invoke' type=androidx.compose.runtime.Composer? origin=null $changed: CALL 'public final fun or (other: kotlin.Int): kotlin.Int [infix] declared in kotlin.Int' type=kotlin.Int origin=null $this: GET_FIELD 'FIELD FIELD_FOR_CAPTURED_VALUE name:$$changed type:kotlin.Int visibility:public/*package*/ [final]' type=kotlin.Int origin=null receiver: GET_VAR ': ui.root.settings.SettingsScreenKt.SettingsScreen. declared in ui.root.settings.SettingsScreenKt.SettingsScreen..invoke' type=ui.root.settings.SettingsScreenKt.SettingsScreen. origin=null other: CONST Int type=kotlin.Int value=1 FIELD FIELD_FOR_CAPTURED_VALUE name:$$changed type:kotlin.Int visibility:public/*package*/ [final] FUN BRIDGE name:invoke visibility:public modality:OPEN <> ($this:ui.root.settings.SettingsScreenKt.SettingsScreen., p1:kotlin.Any?, p2:kotlin.Any?) returnType:kotlin.Any? $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:ui.root.settings.SettingsScreenKt.SettingsScreen. VALUE_PARAMETER BRIDGE name:p1 index:0 type:kotlin.Any? VALUE_PARAMETER BRIDGE name:p2 index:1 type:kotlin.Any? EXPRESSION_BODY CALL 'public final fun invoke ($composer: androidx.compose.runtime.Composer?, $force: kotlin.Int): kotlin.Unit declared in ui.root.settings.SettingsScreenKt.SettingsScreen.' type=kotlin.Unit origin=BRIDGE_DELEGATION $this: GET_VAR ': ui.root.settings.SettingsScreenKt.SettingsScreen. declared in ui.root.settings.SettingsScreenKt.SettingsScreen..invoke' type=ui.root.settings.SettingsScreenKt.SettingsScreen. origin=null $composer: TYPE_OP type=androidx.compose.runtime.Composer origin=IMPLICIT_CAST typeOperand=androidx.compose.runtime.Composer GET_VAR 'p1: kotlin.Any? declared in ui.root.settings.SettingsScreenKt.SettingsScreen..invoke' type=kotlin.Any? origin=null $force: TYPE_OP type=kotlin.Int origin=IMPLICIT_CAST typeOperand=kotlin.Int GET_VAR 'p2: kotlin.Any? declared in ui.root.settings.SettingsScreenKt.SettingsScreen..invoke' type=kotlin.Any? origin=null CONSTRUCTOR_CALL 'public/*package*/ constructor ($$changed: kotlin.Int) [primary] declared in ui.root.settings.SettingsScreenKt.SettingsScreen.' type=ui.root.settings.SettingsScreenKt.SettingsScreen. origin=null $$changed: GET_VAR '$changed: kotlin.Int declared in ui.root.settings.SettingsScreenKt.SettingsScreen' type=kotlin.Int origin=null at org.jetbrains.kotlin.backend.jvm.codegen.FunctionCodegen.generate(FunctionCodegen.kt:50) at org.jetbrains.kotlin.backend.jvm.codegen.FunctionCodegen.generate$default(FunctionCodegen.kt:43) at org.jetbrains.kotlin.backend.jvm.codegen.ClassCodegen.generateMethodNode(ClassCodegen.kt:380) at org.jetbrains.kotlin.backend.jvm.codegen.ClassCodegen.generateMethod(ClassCodegen.kt:397) at org.jetbrains.kotlin.backend.jvm.codegen.ClassCodegen.generate(ClassCodegen.kt:148) at org.jetbrains.kotlin.backend.jvm.FileCodegen.lower(JvmPhases.kt:44) at org.jetbrains.kotlin.backend.common.phaser.FileLoweringPhaseAdapter.invoke(PhaseBuilders.kt:120) at org.jetbrains.kotlin.backend.common.phaser.FileLoweringPhaseAdapter.invoke(PhaseBuilders.kt:116) at org.jetbrains.kotlin.backend.common.phaser.NamedCompilerPhase.invoke(CompilerPhase.kt:96) at org.jetbrains.kotlin.backend.common.phaser.PerformByIrFilePhase.invokeSequential(performByIrFile.kt:65) ... 42 more Caused by: org.jetbrains.kotlin.codegen.CompilationException: Back-end (JVM) Internal error: Couldn't inline method call: CALL 'public final fun Column (modifier: androidx.compose.ui.Modifier?, verticalArrangement: androidx.compose.foundation.layout.Arrangement.Vertical?, horizontalAlignment: androidx.compose.ui.Alignment.Horizontal?, content: @[ExtensionFunctionType] kotlin.Function3, $composer: androidx.compose.runtime.Composer?, $changed: kotlin.Int, $default: kotlin.Int): kotlin.Unit [inline] declared in androidx.compose.foundation.layout.ColumnKt' type=kotlin.Unit origin=null Method: Column (Landroidx/compose/ui/Modifier;Landroidx/compose/foundation/layout/Arrangement$Vertical;Landroidx/compose/ui/Alignment$Horizontal;Lkotlin/jvm/functions/Function3;Landroidx/compose/runtime/Composer;II)V: @Landroidx/compose/runtime/Composable;() // invisible @Landroidx/compose/runtime/ComposableInferredTarget;(scheme="[androidx.compose.ui.UiComposable[androidx.compose.ui.UiComposable]]") // invisible // annotable parameter count: 7 (invisible) @Lorg/jetbrains/annotations/Nullable;() // invisible, parameter 0 @Lorg/jetbrains/annotations/Nullable;() // invisible, parameter 1 @Lorg/jetbrains/annotations/Nullable;() // invisible, parameter 2 @Lorg/jetbrains/annotations/NotNull;() // invisible, parameter 3 @Lorg/jetbrains/annotations/Nullable;() // invisible, parameter 4 L0 ALOAD 3 LDC "content" INVOKESTATIC kotlin/jvm/internal/Intrinsics.checkNotNullParameter (Ljava/lang/Object;Ljava/lang/String;)V ICONST_0 ISTORE 7 L1 ALOAD 4 LDC -483455358 INVOKEINTERFACE androidx/compose/runtime/Composer.startReplaceableGroup (I)V (itf) ALOAD 4 LDC "C(Column)P(2,3,1)77@3913L61,78@3979L133:Column.kt#2w3rfo" INVOKESTATIC androidx/compose/runtime/ComposerKt.sourceInformation (Landroidx/compose/runtime/Composer;Ljava/lang/String;)V L2 L3 LINENUMBER 74 L3 GETSTATIC androidx/compose/foundation/layout/Arrangement.INSTANCE : Landroidx/compose/foundation/layout/Arrangement; INVOKEVIRTUAL androidx/compose/foundation/layout/Arrangement.getTop ()Landroidx/compose/foundation/layout/Arrangement$Vertical; ASTORE 1 L4 L5 LINENUMBER 75 L5 GETSTATIC androidx/compose/ui/Alignment.Companion : Landroidx/compose/ui/Alignment$Companion; INVOKEVIRTUAL androidx/compose/ui/Alignment$Companion.getStart ()Landroidx/compose/ui/Alignment$Horizontal; ASTORE 2 L6 LINENUMBER 78 L6 ALOAD 1 ALOAD 2 ALOAD 4 BIPUSH 14 ILOAD 5 ICONST_3 ISHR IAND BIPUSH 112 ILOAD 5 ICONST_3 ISHR IAND IOR INVOKESTATIC androidx/compose/foundation/layout/ColumnKt.columnMeasurePolicy (Landroidx/compose/foundation/layout/Arrangement$Vertical;Landroidx/compose/ui/Alignment$Horizontal;Landroidx/compose/runtime/Composer;I)Landroidx/compose/ui/layout/MeasurePolicy; ASTORE 8 L7 BIPUSH 112 ILOAD 5 ICONST_3 ISHL IAND ISTORE 9 L8 LINENUMBER 79 L8 NOP L9 ICONST_0 ISTORE 10 L10 ALOAD 4 LDC -1323940314 INVOKEINTERFACE androidx/compose/runtime/Composer.startReplaceableGroup (I)V (itf) ALOAD 4 LDC "C(Layout)P(!1,2)74@2915L7,75@2970L7,76@3029L7,77@3041L460:Layout.kt#80mrfh" INVOKESTATIC androidx/compose/runtime/ComposerKt.sourceInformation (Landroidx/compose/runtime/Composer;Ljava/lang/String;)V L11 LINENUMBER 248 L11 INVOKESTATIC androidx/compose/ui/platform/CompositionLocalsKt.getLocalDensity ()Landroidx/compose/runtime/ProvidableCompositionLocal; CHECKCAST androidx/compose/runtime/CompositionLocal ASTORE 11 BIPUSH 6 ISTORE 12 L12 ICONST_0 ISTORE 13 L13 ALOAD 4 LDC 2023513938 LDC "C:CompositionLocal.kt#9igjgp" L14 LINENUMBER 249 L14 INVOKESTATIC androidx/compose/runtime/ComposerKt.sourceInformationMarkerStart (Landroidx/compose/runtime/Composer;ILjava/lang/String;)V ALOAD 4 ALOAD 11 INVOKEINTERFACE androidx/compose/runtime/Composer.consume (Landroidx/compose/runtime/CompositionLocal;)Ljava/lang/Object; (itf) ASTORE 14 ALOAD 4 INVOKESTATIC androidx/compose/runtime/ComposerKt.sourceInformationMarkerEnd (Landroidx/compose/runtime/Composer;)V ALOAD 14 L15 LINENUMBER 248 L15 CHECKCAST androidx/compose/ui/unit/Density ASTORE 15 L16 LINENUMBER 250 L16 INVOKESTATIC androidx/compose/ui/platform/CompositionLocalsKt.getLocalLayoutDirection ()Landroidx/compose/runtime/ProvidableCompositionLocal; CHECKCAST androidx/compose/runtime/CompositionLocal ASTORE 12 BIPUSH 6 ISTORE 13 L17 ICONST_0 ISTORE 14 L18 ALOAD 4 LDC 2023513938 LDC "C:CompositionLocal.kt#9igjgp" L19 LINENUMBER 249 L19 INVOKESTATIC androidx/compose/runtime/ComposerKt.sourceInformationMarkerStart (Landroidx/compose/runtime/Composer;ILjava/lang/String;)V ALOAD 4 ALOAD 12 INVOKEINTERFACE androidx/compose/runtime/Composer.consume (Landroidx/compose/runtime/CompositionLocal;)Ljava/lang/Object; (itf) ASTORE 16 ALOAD 4 INVOKESTATIC androidx/compose/runtime/ComposerKt.sourceInformationMarkerEnd (Landroidx/compose/runtime/Composer;)V ALOAD 16 L20 LINENUMBER 250 L20 CHECKCAST androidx/compose/ui/unit/LayoutDirection ASTORE 11 L21 LINENUMBER 251 L21 INVOKESTATIC androidx/compose/ui/platform/CompositionLocalsKt.getLocalViewConfiguration ()Landroidx/compose/runtime/ProvidableCompositionLocal; CHECKCAST androidx/compose/runtime/CompositionLocal ASTORE 13 BIPUSH 6 ISTORE 14 L22 ICONST_0 ISTORE 16 L23 ALOAD 4 LDC 2023513938 LDC "C:CompositionLocal.kt#9igjgp" L24 LINENUMBER 249 L24 INVOKESTATIC androidx/compose/runtime/ComposerKt.sourceInformationMarkerStart (Landroidx/compose/runtime/Composer;ILjava/lang/String;)V ALOAD 4 ALOAD 13 INVOKEINTERFACE androidx/compose/runtime/Composer.consume (Landroidx/compose/runtime/CompositionLocal;)Ljava/lang/Object; (itf) ASTORE 17 ALOAD 4 INVOKESTATIC androidx/compose/runtime/ComposerKt.sourceInformationMarkerEnd (Landroidx/compose/runtime/Composer;)V ALOAD 17 L25 LINENUMBER 251 L25 CHECKCAST androidx/compose/ui/platform/ViewConfiguration ASTORE 12 L26 LINENUMBER 253 L26 GETSTATIC androidx/compose/ui/node/ComposeUiNode.Companion : Landroidx/compose/ui/node/ComposeUiNode$Companion; INVOKEVIRTUAL androidx/compose/ui/node/ComposeUiNode$Companion.getConstructor ()Lkotlin/jvm/functions/Function0; ASTORE 13 L27 LINENUMBER 260 L27 ALOAD 0 INVOKESTATIC androidx/compose/ui/layout/LayoutKt.materializerOf (Landroidx/compose/ui/Modifier;)Lkotlin/jvm/functions/Function3; ASTORE 14 BIPUSH 6 SIPUSH 7168 ILOAD 9 BIPUSH 9 ISHL IAND IOR ISTORE 16 L28 LINENUMBER 252 L28 NOP L29 ICONST_0 ISTORE 17 L30 LINENUMBER 261 L30 ALOAD 4 INVOKEINTERFACE androidx/compose/runtime/Composer.getApplier ()Landroidx/compose/runtime/Applier; (itf) INSTANCEOF androidx/compose/runtime/Applier IFNE L31 INVOKESTATIC androidx/compose/runtime/ComposablesKt.invalidApplier ()V L31 ALOAD 4 L32 LINENUMBER 262 L32 INVOKEINTERFACE androidx/compose/runtime/Composer.startReusableNode ()V (itf) L33 LINENUMBER 263 L33 ALOAD 4 INVOKEINTERFACE androidx/compose/runtime/Composer.getInserting ()Z (itf) IFEQ L34 ALOAD 4 L35 LINENUMBER 264 L35 ALOAD 13 INVOKEINTERFACE androidx/compose/runtime/Composer.createNode (Lkotlin/jvm/functions/Function0;)V (itf) GOTO L36 L34 ALOAD 4 L37 LINENUMBER 266 L37 INVOKEINTERFACE androidx/compose/runtime/Composer.useNode ()V (itf) L36 ALOAD 4 L38 LINENUMBER 268 L38 INVOKEINTERFACE androidx/compose/runtime/Composer.disableReusing ()V (itf) L39 LINENUMBER 269 L39 ALOAD 4 INVOKESTATIC androidx/compose/runtime/Updater.constructor-impl (Landroidx/compose/runtime/Composer;)Landroidx/compose/runtime/Composer; ASTORE 18 L40 ICONST_0 ISTORE 19 L41 LINENUMBER 255 L41 ALOAD 18 ALOAD 8 GETSTATIC androidx/compose/ui/node/ComposeUiNode.Companion : Landroidx/compose/ui/node/ComposeUiNode$Companion; INVOKEVIRTUAL androidx/compose/ui/node/ComposeUiNode$Companion.getSetMeasurePolicy ()Lkotlin/jvm/functions/Function2; INVOKESTATIC androidx/compose/runtime/Updater.set-impl (Landroidx/compose/runtime/Composer;Ljava/lang/Object;Lkotlin/jvm/functions/Function2;)V L42 LINENUMBER 256 L42 ALOAD 18 ALOAD 15 GETSTATIC androidx/compose/ui/node/ComposeUiNode.Companion : Landroidx/compose/ui/node/ComposeUiNode$Companion; INVOKEVIRTUAL androidx/compose/ui/node/ComposeUiNode$Companion.getSetDensity ()Lkotlin/jvm/functions/Function2; INVOKESTATIC androidx/compose/runtime/Updater.set-impl (Landroidx/compose/runtime/Composer;Ljava/lang/Object;Lkotlin/jvm/functions/Function2;)V L43 LINENUMBER 257 L43 ALOAD 18 ALOAD 11 GETSTATIC androidx/compose/ui/node/ComposeUiNode.Companion : Landroidx/compose/ui/node/ComposeUiNode$Companion; INVOKEVIRTUAL androidx/compose/ui/node/ComposeUiNode$Companion.getSetLayoutDirection ()Lkotlin/jvm/functions/Function2; INVOKESTATIC androidx/compose/runtime/Updater.set-impl (Landroidx/compose/runtime/Composer;Ljava/lang/Object;Lkotlin/jvm/functions/Function2;)V L44 LINENUMBER 258 L44 ALOAD 18 ALOAD 12 GETSTATIC androidx/compose/ui/node/ComposeUiNode.Companion : Landroidx/compose/ui/node/ComposeUiNode$Companion; INVOKEVIRTUAL androidx/compose/ui/node/ComposeUiNode$Companion.getSetViewConfiguration ()Lkotlin/jvm/functions/Function2; INVOKESTATIC androidx/compose/runtime/Updater.set-impl (Landroidx/compose/runtime/Composer;Ljava/lang/Object;Lkotlin/jvm/functions/Function2;)V L45 LINENUMBER 259 L45 NOP L46 ALOAD 4 L47 LINENUMBER 270 L47 INVOKEINTERFACE androidx/compose/runtime/Composer.enableReusing ()V (itf) L48 LINENUMBER 271 L48 ALOAD 14 ALOAD 4 INVOKESTATIC androidx/compose/runtime/SkippableUpdater.constructor-impl (Landroidx/compose/runtime/Composer;)Landroidx/compose/runtime/Composer; INVOKESTATIC androidx/compose/runtime/SkippableUpdater.box-impl (Landroidx/compose/runtime/Composer;)Landroidx/compose/runtime/SkippableUpdater; ALOAD 4 BIPUSH 112 ILOAD 16 ICONST_3 ISHR IAND INVOKESTATIC java/lang/Integer.valueOf (I)Ljava/lang/Integer; INVOKEINTERFACE kotlin/jvm/functions/Function3.invoke (Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object; (itf) POP ALOAD 4 L49 LINENUMBER 272 L49 LDC 2058660585 INVOKEINTERFACE androidx/compose/runtime/Composer.startReplaceableGroup (I)V (itf) L50 LINENUMBER 273 L50 ALOAD 4 BIPUSH 14 ILOAD 16 BIPUSH 9 ISHR IAND ISTORE 20 ASTORE 21 L51 ICONST_0 ISTORE 22 L52 ALOAD 21 LDC -1163856341 INVOKEINTERFACE androidx/compose/runtime/Composer.startReplaceableGroup (I)V (itf) ALOAD 21 LDC "C79@4027L9:Column.kt#2w3rfo" INVOKESTATIC androidx/compose/runtime/ComposerKt.sourceInformation (Landroidx/compose/runtime/Composer;Ljava/lang/String;)V L53 LINENUMBER 80 L53 ILOAD 20 BIPUSH 11 IAND ICONST_2 IF_ICMPNE L54 ALOAD 21 INVOKEINTERFACE androidx/compose/runtime/Composer.getSkipping ()Z (itf) IFNE L55 L54 ALOAD 3 GETSTATIC androidx/compose/foundation/layout/ColumnScopeInstance.INSTANCE : Landroidx/compose/foundation/layout/ColumnScopeInstance; ALOAD 21 BIPUSH 6 BIPUSH 112 ILOAD 5 BIPUSH 6 ISHR IAND IOR INVOKESTATIC java/lang/Integer.valueOf (I)Ljava/lang/Integer; INVOKEINTERFACE kotlin/jvm/functions/Function3.invoke (Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object; (itf) POP GOTO L56 L55 ALOAD 21 INVOKEINTERFACE androidx/compose/runtime/Composer.skipToGroupEnd ()V (itf) L56 ALOAD 21 INVOKEINTERFACE androidx/compose/runtime/Composer.endReplaceableGroup ()V (itf) L57 ALOAD 4 L58 LINENUMBER 274 L58 INVOKEINTERFACE androidx/compose/runtime/Composer.endReplaceableGroup ()V (itf) ALOAD 4 L59 LINENUMBER 275 L59 INVOKEINTERFACE androidx/compose/runtime/Composer.endNode ()V (itf) L60 LINENUMBER 276 L60 NOP L61 ALOAD 4 INVOKEINTERFACE androidx/compose/runtime/Composer.endReplaceableGroup ()V (itf) L62 LINENUMBER 277 L62 NOP L63 ALOAD 4 INVOKEINTERFACE androidx/compose/runtime/Composer.endReplaceableGroup ()V (itf) L64 LINENUMBER 84 L64 RETURN L65 LOCALVARIABLE $i$a$-Layout-ColumnKt$Column$1 I L52 L57 22 LOCALVARIABLE $composer Landroidx/compose/runtime/Composer; L51 L57 21 LOCALVARIABLE $changed I L51 L57 20 LOCALVARIABLE $i$f$getCurrent I L13 L15 13 LOCALVARIABLE this_$iv$iv Landroidx/compose/runtime/CompositionLocal; L12 L15 11 LOCALVARIABLE $changed$iv$iv I L12 L15 12 LOCALVARIABLE $i$f$getCurrent I L18 L20 14 LOCALVARIABLE this_$iv$iv Landroidx/compose/runtime/CompositionLocal; L17 L20 12 LOCALVARIABLE $changed$iv$iv I L17 L20 13 LOCALVARIABLE $i$f$getCurrent I L23 L25 16 LOCALVARIABLE this_$iv$iv Landroidx/compose/runtime/CompositionLocal; L22 L25 13 LOCALVARIABLE $changed$iv$iv I L22 L25 14 LOCALVARIABLE $i$a$-ReusableComposeNode-LayoutKt$Layout$1$iv I L41 L46 19 LOCALVARIABLE $this$Layout_u24lambda_u2d0$iv Landroidx/compose/runtime/Composer; L40 L46 18 LOCALVARIABLE $i$f$ReusableComposeNode I L30 L61 17 LOCALVARIABLE factory$iv$iv Lkotlin/jvm/functions/Function0; L29 L61 13 LOCALVARIABLE skippableUpdate$iv$iv Lkotlin/jvm/functions/Function3; L29 L61 14 LOCALVARIABLE $changed$iv$iv I L29 L61 16 LOCALVARIABLE $i$f$Layout I L10 L63 10 LOCALVARIABLE density$iv Landroidx/compose/ui/unit/Density; L16 L63 15 LOCALVARIABLE layoutDirection$iv Landroidx/compose/ui/unit/LayoutDirection; L21 L63 11 LOCALVARIABLE viewConfiguration$iv Landroidx/compose/ui/platform/ViewConfiguration; L26 L63 12 LOCALVARIABLE $changed$iv I L9 L63 9 LOCALVARIABLE $i$f$Column I L1 L65 7 LOCALVARIABLE measurePolicy Landroidx/compose/ui/layout/MeasurePolicy; L7 L65 8 LOCALVARIABLE modifier Landroidx/compose/ui/Modifier; L0 L65 0 LOCALVARIABLE verticalArrangement Landroidx/compose/foundation/layout/Arrangement$Vertical; L4 L65 1 LOCALVARIABLE horizontalAlignment Landroidx/compose/ui/Alignment$Horizontal; L6 L65 2 LOCALVARIABLE content Lkotlin/jvm/functions/Function3; L0 L65 3 LOCALVARIABLE $composer Landroidx/compose/runtime/Composer; L0 L65 4 LOCALVARIABLE $changed I L0 L65 5 MAXSTACK = 7 MAXLOCALS = 23 File is unknown The root cause org.jetbrains.org.objectweb.asm.tree.analysis.AnalyzerException was thrown at: org.jetbrains.kotlin.codegen.optimization.fixStack.FastStackAnalyzer.analyze(FastStackAnalyzer.kt:131) at org.jetbrains.kotlin.codegen.inline.InlineCodegen.performInline(InlineCodegen.kt:63) at org.jetbrains.kotlin.backend.jvm.codegen.IrInlineCodegen.genInlineCall(IrInlineCodegen.kt:163) at org.jetbrains.kotlin.backend.jvm.codegen.IrInlineCallGenerator$DefaultImpls.genCall(IrInlineCallGenerator.kt:31) at org.jetbrains.kotlin.backend.jvm.codegen.IrInlineCodegen.genCall(IrInlineCodegen.kt:34) at org.jetbrains.kotlin.backend.jvm.codegen.ExpressionCodegen.visitCall(ExpressionCodegen.kt:522) at org.jetbrains.kotlin.backend.jvm.codegen.ExpressionCodegen.visitCall(ExpressionCodegen.kt:130) at org.jetbrains.kotlin.ir.expressions.IrCall.accept(IrCall.kt:17) at org.jetbrains.kotlin.backend.jvm.codegen.ExpressionCodegen.visitStatementContainer(ExpressionCodegen.kt:457) at org.jetbrains.kotlin.backend.jvm.codegen.ExpressionCodegen.visitContainerExpression(ExpressionCodegen.kt:470) at org.jetbrains.kotlin.backend.jvm.codegen.ExpressionCodegen.visitContainerExpression(ExpressionCodegen.kt:130) at org.jetbrains.kotlin.ir.visitors.IrElementVisitor$DefaultImpls.visitBlock(IrElementVisitor.kt:64) at org.jetbrains.kotlin.backend.jvm.codegen.ExpressionCodegen.visitBlock(ExpressionCodegen.kt:399) at org.jetbrains.kotlin.backend.jvm.codegen.ExpressionCodegen.visitBlock(ExpressionCodegen.kt:130) at org.jetbrains.kotlin.ir.expressions.IrBlock.accept(IrBlock.kt:15) at org.jetbrains.kotlin.backend.jvm.codegen.ExpressionCodegen.visitWhen(ExpressionCodegen.kt:970) at org.jetbrains.kotlin.backend.jvm.codegen.ExpressionCodegen.visitWhen(ExpressionCodegen.kt:130) at org.jetbrains.kotlin.ir.expressions.IrWhen.accept(IrWhen.kt:17) at org.jetbrains.kotlin.backend.jvm.codegen.ExpressionCodegen.visitStatementContainer(ExpressionCodegen.kt:457) at org.jetbrains.kotlin.backend.jvm.codegen.ExpressionCodegen.visitBlockBody(ExpressionCodegen.kt:461) at org.jetbrains.kotlin.backend.jvm.codegen.ExpressionCodegen.visitBlockBody(ExpressionCodegen.kt:130) at org.jetbrains.kotlin.ir.expressions.IrBlockBody.accept(IrBlockBody.kt:17) at org.jetbrains.kotlin.backend.jvm.codegen.ExpressionCodegen.generate(ExpressionCodegen.kt:234) at org.jetbrains.kotlin.backend.jvm.codegen.FunctionCodegen.doGenerate(FunctionCodegen.kt:122) at org.jetbrains.kotlin.backend.jvm.codegen.FunctionCodegen.generate(FunctionCodegen.kt:48) ... 51 more Caused by: org.jetbrains.org.objectweb.asm.tree.analysis.AnalyzerException: Error at instruction #713 IOR: Cannot pop operand off an empty stack. at org.jetbrains.kotlin.codegen.optimization.fixStack.FastStackAnalyzer.analyze(FastStackAnalyzer.kt:131) at org.jetbrains.kotlin.codegen.inline.MethodInliner.preprocessNodeBeforeInline(MethodInliner.kt:790) at org.jetbrains.kotlin.codegen.inline.MethodInliner.markPlacesForInlineAndRemoveInlinable(MethodInliner.kt:466) at org.jetbrains.kotlin.codegen.inline.MethodInliner.doInline(MethodInliner.kt:92) at org.jetbrains.kotlin.codegen.inline.MethodInliner.access$doInline(MethodInliner.kt:42) at org.jetbrains.kotlin.codegen.inline.MethodInliner$doInline$lambdaInliner$1.visitMethodInsn(MethodInliner.kt:279) at org.jetbrains.org.objectweb.asm.tree.MethodInsnNode.accept(MethodInsnNode.java:115) at org.jetbrains.org.objectweb.asm.tree.InsnList.accept(InsnList.java:144) at org.jetbrains.org.objectweb.asm.tree.MethodNode.accept(MethodNode.java:751) at org.jetbrains.kotlin.codegen.inline.MethodInliner.doInline(MethodInliner.kt:346) at org.jetbrains.kotlin.codegen.inline.MethodInliner.doInline(MethodInliner.kt:97) at org.jetbrains.kotlin.codegen.inline.MethodInliner.doInline(MethodInliner.kt:71) at org.jetbrains.kotlin.codegen.inline.InlineCodegen.inlineCall(InlineCodegen.kt:119) at org.jetbrains.kotlin.codegen.inline.InlineCodegen.performInline(InlineCodegen.kt:50) ... 74 more Caused by: java.lang.IndexOutOfBoundsException: Cannot pop operand off an empty stack. at org.jetbrains.org.objectweb.asm.tree.analysis.Frame.pop(Frame.java:228) at org.jetbrains.org.objectweb.asm.tree.analysis.Frame.execute(Frame.java:484) at org.jetbrains.kotlin.codegen.optimization.fixStack.FastStackAnalyzer.analyze(FastStackAnalyzer.kt:100) ... 87 more ```
okushnikov commented 3 months ago

Please check the following ticket on YouTrack for follow-ups to this issue. GitHub issues will be closed in the coming weeks.

okushnikov commented 3 months ago

Please check the following ticket on YouTrack for follow-ups to this issue. GitHub issues will be closed in the coming weeks.