File tree Expand file tree Collapse file tree 2 files changed +33
-0
lines changed Expand file tree Collapse file tree 2 files changed +33
-0
lines changed Original file line number Diff line number Diff line change
1
+ package org.example
2
+
3
+ import androidx.compose.runtime.*
4
+
5
+ /* *
6
+ * https://github.com/JetBrains/kotlin/blob/2.1.0/plugins/compose/compiler-hosted/src/main/java/androidx/compose/compiler/plugins/kotlin/lower/ComposableFunctionBodyTransformer.kt#L3018-L3022
7
+ * https://github.com/JetBrains/kotlin/blob/2.1.0/plugins/compose/compiler-hosted/src/main/java/androidx/compose/compiler/plugins/kotlin/lower/ComposableFunctionBodyTransformer.kt#L1364-L1407
8
+ */
9
+ @Composable
10
+ fun default_arguments_example (
11
+ a : String = "a",
12
+ b : String = "b",
13
+ ) {
14
+ }
15
+
16
+ fun non_composable_example (
17
+ a : String = "a",
18
+ b : String = "b",
19
+ ) {
20
+ }
21
+
22
+ @Composable
23
+ fun default_arguments () {
24
+ default_arguments_example()
25
+ non_composable_example()
26
+ }
Original file line number Diff line number Diff line change @@ -22,4 +22,11 @@ class ExampleTest {
22
22
compose.onNodeWithText(" Click me again" ).assertDoesNotExist()
23
23
}
24
24
25
+ @Test
26
+ fun test_default_arguments () {
27
+ compose.setContent {
28
+ default_arguments()
29
+ }
30
+ }
31
+
25
32
}
You can’t perform that action at this time.
0 commit comments