Skip to content

Conversation

@rjrjr
Copy link
Collaborator

@rjrjr rjrjr commented Oct 16, 2023

Adds a few crucial out declarations to various Container and Wrapper types, so that declaring RenderingT types like BackStackScreen<*> is practical. Also required moving fun BackStackScreen.plus out to be an extension function.

Without these changes, this does not compile:

    val foo = BackStackScreen(FooScreen(1))
    val bar = BackStackScreen(BarScreen(1))
    val both = foo + bar

Instead we were forced to do things like:

    val foo: BackStackScreen<Screen> = BackStackScreen(FooScreen(1))
    val bar: BackStackScreen<Screen> = BackStackScreen(BarScreen(1))
    val both = foo + bar

It gets really old really fast.

@rjrjr rjrjr force-pushed the ray/tighten-up-backstack-types branch from a3c37ee to d1c5c4a Compare October 16, 2023 23:59
Adds a few crucial `out` declarations to various `Container` and `Wrapper` types, so that declaring `RenderingT` types like `BackStackScreen<*>` is practical. Also required moving `fun BackStackScreen.plus` out to be an extension function.

Without these changes, this does not compile:

```kotlin
    val foo = BackStackScreen(FooScreen(1))
    val bar = BackStackScreen(BarScreen(1))
    val both = foo + bar
```

Instead we were forced to do things like:

```kotlin
    val foo: BackStackScreen<Screen> = BackStackScreen(FooScreen(1))
    val bar: BackStackScreen<Screen> = BackStackScreen(BarScreen(1))
    val both = foo + bar
```

It gets really old really fast.
@rjrjr rjrjr force-pushed the ray/tighten-up-backstack-types branch from d1c5c4a to 927c038 Compare October 17, 2023 00:13
Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@rjrjr rjrjr marked this pull request as ready for review October 17, 2023 00:35
@rjrjr rjrjr requested review from a team and zach-klippenstein as code owners October 17, 2023 00:35
@rjrjr rjrjr requested a review from wardellbagby October 17, 2023 16:35
@rjrjr rjrjr merged commit d352bb1 into main Oct 17, 2023
@rjrjr rjrjr deleted the ray/tighten-up-backstack-types branch October 17, 2023 17:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants