Closed toth-istvan-zoltan closed 5 days ago
Fix handling of missing vararg arguments when passing instructions to other fragments.
This function fails when it is called with no instructions passed:
@Adaptive fun layoutExample(title: String, vararg instructions: AdaptiveInstruction, @Adaptive example: () -> Unit) : AdaptiveFragment { column(*instructions) { } }
This one works:
@Adaptive fun layoutExample(title: String, vararg instructions: AdaptiveInstruction = emptyArray(), @Adaptive example: () -> Unit) : AdaptiveFragment { column(*instructions) { } }
When not present, state definition transform adds the emptyArray() default value.
emptyArray()
Fix handling of missing vararg arguments when passing instructions to other fragments.
This function fails when it is called with no instructions passed:
This one works: