From fa42afa90d936363a45afd62ff0616b0d1c3a008 Mon Sep 17 00:00:00 2001 From: Jake Wharton Date: Tue, 4 Jun 2024 16:02:13 -0400 Subject: [PATCH] Add some missing Compose annotations (#2080) Caught by K2 now, thankfully. --- redwood-layout-composeui/api/redwood-layout-composeui.klib.api | 2 +- .../cash/redwood/layout/composeui/ComposeUiFlexContainerTest.kt | 2 +- .../layout/composeui/ComposeUiRedwoodLayoutWidgetFactory.kt | 2 +- .../app/cash/redwood/layout/composeui/ComposeUiLazyListTest.kt | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/redwood-layout-composeui/api/redwood-layout-composeui.klib.api b/redwood-layout-composeui/api/redwood-layout-composeui.klib.api index 6ddac04e20..ca5dbd23f5 100644 --- a/redwood-layout-composeui/api/redwood-layout-composeui.klib.api +++ b/redwood-layout-composeui/api/redwood-layout-composeui.klib.api @@ -16,7 +16,7 @@ final class app.cash.redwood.layout.composeui/BoxMeasurePolicy : androidx.compos } final class app.cash.redwood.layout.composeui/ComposeUiRedwoodLayoutWidgetFactory : app.cash.redwood.layout.widget/RedwoodLayoutWidgetFactory> { // app.cash.redwood.layout.composeui/ComposeUiRedwoodLayoutWidgetFactory|null[0] constructor () // app.cash.redwood.layout.composeui/ComposeUiRedwoodLayoutWidgetFactory.|(){}[0] - final fun Box(): app.cash.redwood.layout.widget/Box> // app.cash.redwood.layout.composeui/ComposeUiRedwoodLayoutWidgetFactory.Box|Box(){}[0] + final fun Box(): app.cash.redwood.layout.widget/Box> // app.cash.redwood.layout.composeui/ComposeUiRedwoodLayoutWidgetFactory.Box|Box(){}[0] final fun Column(): app.cash.redwood.layout.widget/Column> // app.cash.redwood.layout.composeui/ComposeUiRedwoodLayoutWidgetFactory.Column|Column(){}[0] final fun Row(): app.cash.redwood.layout.widget/Row> // app.cash.redwood.layout.composeui/ComposeUiRedwoodLayoutWidgetFactory.Row|Row(){}[0] final fun Spacer(): app.cash.redwood.layout.widget/Spacer> // app.cash.redwood.layout.composeui/ComposeUiRedwoodLayoutWidgetFactory.Spacer|Spacer(){}[0] diff --git a/redwood-layout-composeui/src/androidUnitTest/kotlin/app/cash/redwood/layout/composeui/ComposeUiFlexContainerTest.kt b/redwood-layout-composeui/src/androidUnitTest/kotlin/app/cash/redwood/layout/composeui/ComposeUiFlexContainerTest.kt index 31e9acc012..61031d42a7 100644 --- a/redwood-layout-composeui/src/androidUnitTest/kotlin/app/cash/redwood/layout/composeui/ComposeUiFlexContainerTest.kt +++ b/redwood-layout-composeui/src/androidUnitTest/kotlin/app/cash/redwood/layout/composeui/ComposeUiFlexContainerTest.kt @@ -79,7 +79,7 @@ class ComposeUiFlexContainerTest( addAt(childCount, widget) } - override fun addAt(index: Int, widget: Widget<() -> Unit>) { + override fun addAt(index: Int, widget: Widget<@Composable () -> Unit>) { delegate.children.insert(index, widget) childCount++ } diff --git a/redwood-layout-composeui/src/commonMain/kotlin/app/cash/redwood/layout/composeui/ComposeUiRedwoodLayoutWidgetFactory.kt b/redwood-layout-composeui/src/commonMain/kotlin/app/cash/redwood/layout/composeui/ComposeUiRedwoodLayoutWidgetFactory.kt index 9a7a8fd892..7df88755bd 100644 --- a/redwood-layout-composeui/src/commonMain/kotlin/app/cash/redwood/layout/composeui/ComposeUiRedwoodLayoutWidgetFactory.kt +++ b/redwood-layout-composeui/src/commonMain/kotlin/app/cash/redwood/layout/composeui/ComposeUiRedwoodLayoutWidgetFactory.kt @@ -24,7 +24,7 @@ import app.cash.redwood.layout.widget.Spacer import app.cash.redwood.yoga.FlexDirection public class ComposeUiRedwoodLayoutWidgetFactory : RedwoodLayoutWidgetFactory<@Composable () -> Unit> { - override fun Box(): Box<() -> Unit> = ComposeUiBox() + override fun Box(): Box<@Composable () -> Unit> = ComposeUiBox() override fun Column(): Column<@Composable () -> Unit> = ComposeUiFlexContainer(FlexDirection.Column) override fun Row(): Row<@Composable () -> Unit> = ComposeUiFlexContainer(FlexDirection.Row) override fun Spacer(): Spacer<@Composable () -> Unit> = ComposeUiSpacer() diff --git a/redwood-lazylayout-composeui/src/androidUnitTest/kotlin/app/cash/redwood/layout/composeui/ComposeUiLazyListTest.kt b/redwood-lazylayout-composeui/src/androidUnitTest/kotlin/app/cash/redwood/layout/composeui/ComposeUiLazyListTest.kt index 7d71ca45a9..c6dc43c4fc 100644 --- a/redwood-lazylayout-composeui/src/androidUnitTest/kotlin/app/cash/redwood/layout/composeui/ComposeUiLazyListTest.kt +++ b/redwood-lazylayout-composeui/src/androidUnitTest/kotlin/app/cash/redwood/layout/composeui/ComposeUiLazyListTest.kt @@ -123,7 +123,7 @@ class ComposeUiLazyListTest( addAt(childCount, widget) } - override fun addAt(index: Int, widget: Widget<() -> Unit>) { + override fun addAt(index: Int, widget: Widget<@Composable () -> Unit>) { delegate.items.insert(index, widget) childCount++ }