robnik
02/12/2021, 6:43 PMKotlin version that is used for building with Gradle (1.4.30) differs from the one bundled into the IDE plugin (1.4.21)
. It's on the line inside buildscript.dependencies: `classpath "org.jetbrains.kotlinkotlin gradle plugin$kotlin_version"`` . I thought we were supposed to use Kotlin 1.4.30 now? The Kotlin plugin doesn't seem to have an update available. I'm getting a much worse internal compiler error later, so I'm trying to sort out this warning first.Vsevolod Ganin
02/12/2021, 6:45 PMrobnik
02/12/2021, 6:58 PMVsevolod Ganin
02/12/2021, 7:10 PMCaused by: org.jetbrains.kotlin.codegen.CompilationException: Back-end (JVM) Internal error: Couldn't inline method call 'Column' into
public final fun invoke(paddingValues: androidx.compose.foundation.layout.PaddingValues, `$composer`: androidx.compose.runtime.Composer?, `$changed`: <http://kotlin.Int|kotlin.Int>): kotlin.Unit defined in com.mycompany.androidapp.`ComposableSingletons$AutoLoanAndInsuranceScreenKt`.<clinit>.<no name provided>
robnik
02/12/2021, 8:45 PM::method
refs...
package co.demo
import androidx.compose.foundation.layout.*
import androidx.compose.material.*
import androidx.compose.runtime.*
@Composable
fun Problem() {
fun foo() { }
Scaffold() { _ ->
Column() {
Button(onClick = ::foo) { }
}
}
}
{ foo() }
is a simple replacement.Vsevolod Ganin
02/12/2021, 9:58 PMrobnik
02/12/2021, 10:09 PMScafford
part it compiles okay, so not not all function refs are a problem. Pretty sure I'm using alpha12.Alex Bieliaiev
02/13/2021, 8:43 AMfoo
function to the top-level scope?Vsevolod Ganin
02/13/2021, 11:06 AMDid you try my code snippet?Ok, tried now and can confirm that compiler crashes. Compiler definitely shouldn’t crash. From the stacktrace I got the idea that it has to do with Compose compiler so imo you should file a bug to compiler component https://issuetracker.google.com/issues?q=componentid:610764
robnik
02/13/2021, 3:46 PM