Fixed
Status Update
Comments
an...@google.com <an...@google.com> #2
Narrowed this down quite a bit: Default vararg arguments on inline composable functions can't be called across modules.
Minimal repro: Create two modules foo and bar, where foo depends on bar.
Add this code to the bar module:
@Composable
inline fun Bar(
vararg keys: Any? = emptyArray()
) {}
Add this code to the foo module:
@Composable
fun Foo() {
Bar()
}
Foo will fail to compile with the IR lowering error in the bug description. Removing the inline
or emptyArray()
default will fix this error. Not a blocker for rememberRetained since the API shouldn't have been specifying default vararg arguments anyway.
Description
Relevant error in the stacktrace:
To reproduce, clone aosp/3452915 and try to build and run the
RememberRetainedTests
. It seems like something in the method signature ofrememberRetained
is throwing off the compiler? Likely the combination of inline, varargs, default arguments and default composable arguments. Could also have something to do with calling the internal@PublishedApi
?