Skip to content

Plugin typealias invalid runtime detection instead of stable. #16

@Tolriq

Description

@Tolriq

Please complete the following information:

  • Library Version 0.4.2

Describe the Bug:

Using typealias like typealias SettingsButtons = @Composable (playerUiState: PlayerUiState) -> Unit and using them as parameter in functions will mark them as runtime instead of stable (Even with strong skipping enabled).

typealias SettingsButtons = @Composable (playerUiState: PlayerUiState) -> Unit

@Composable
fun PlayerScreen(
    buttons: SettingsButtons = {},
) { }

@Composable
fun PlayerScreen2(
    buttons: @Composable (playerUiState: PlayerUiState) -> Unit = {},
) { }

They are marked as interface type - internal implementation could be mutable

Expected Behavior:

Using type alias should not have issue in this case.
The compiler dumps confirm that they are stable as resolved
stable buttons: Function3<@[ParameterName(name = 'playerUiState')] PlayerUiState, Composer, Int, Unit>? = @static <expression>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions