I'm currently developing a Kotlin Multiplatform application with a shared Compose UI for the Android and JVM platforms. Of course several Composables require platform-specific code so I'm using the expect / actual mechanism here. Some rules don't handle this correctly at the moment.
@Composable
expect fun PlatformSpecifcComposable(modifier: Modifier = Modifier)
@Composable
actual fun PlatformSpecifcComposable(modifier: Modifier) {
}
For instance on actual fun PlatformSpecifcComposable(modifier: Modifier) I now get the error
[twitter-compose:modifier-without-default-check] This @Composable function has a modifier parameter but it doesn't have a default value
Default values can only be specified at the expect level. Maybe other rules are also affected?
I'm currently developing a Kotlin Multiplatform application with a shared Compose UI for the Android and JVM platforms. Of course several Composables require platform-specific code so I'm using the
expect
/actual
mechanism here. Some rules don't handle this correctly at the moment.For instance on
actual fun PlatformSpecifcComposable(modifier: Modifier)
I now get the errorDefault values can only be specified at the
expect
level. Maybe other rules are also affected?Twitter Compose Rules version
0.0.14
.