Browse Source

web: add compiler test case `Composable With Default Values Defined By Other Params` (#1230)

Co-authored-by: Oleksandr Karpovich <oleksandr.karpovich@jetbrains.com>
pull/1231/head
Oleksandr Karpovich 3 years ago committed by GitHub
parent
commit
3795ad1fb9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      web/compose-compiler-integration/main-template/lib/build.gradle.kts
  2. 1
      web/compose-compiler-integration/main-template/settings.gradle.kts
  3. 24
      web/compose-compiler-integration/testcases/failing/ComposableWithDefaultValuesDefinedByOtherParams.kt

1
web/compose-compiler-integration/main-template/lib/build.gradle.kts

@ -4,6 +4,7 @@ plugins {
} }
repositories { repositories {
mavenLocal()
mavenCentral() mavenCentral()
maven("https://maven.pkg.jetbrains.space/public/p/compose/dev") maven("https://maven.pkg.jetbrains.space/public/p/compose/dev")
} }

1
web/compose-compiler-integration/main-template/settings.gradle.kts

@ -1,5 +1,6 @@
pluginManagement { pluginManagement {
repositories { repositories {
mavenLocal()
gradlePluginPortal() gradlePluginPortal()
maven { maven {
url = uri("https://maven.pkg.jetbrains.space/public/p/compose/dev") url = uri("https://maven.pkg.jetbrains.space/public/p/compose/dev")

24
web/compose-compiler-integration/testcases/failing/ComposableWithDefaultValuesDefinedByOtherParams.kt

@ -0,0 +1,24 @@
// @Module:Main
import androidx.compose.runtime.Composable
import androidx.compose.runtime.currentComposer
import androidx.compose.runtime.Composer
fun main() {
callComposable {
ComposableWithDefaultParamsDefinedByOtherParams("a")
}
}
fun callComposable(content: @Composable () -> Unit) {
val c = content
}
// @Module:Lib
import androidx.compose.runtime.Composable
@Composable
fun ComposableWithDefaultParamsDefinedByOtherParams(
a: String,
b: String = a
) {
}
Loading…
Cancel
Save