mutekt icon indicating copy to clipboard operation
mutekt copied to clipboard

Incorrectly generated code using a typealias as a type paramter.

Open tevjef opened this issue 2 years ago • 2 comments

Invalid code is generated when an interface uses a typealias as a type paramter.

typealias SomeTypeAlias = TypeA<out TypeB>

@GenerateMutableModel
interface UiState {
    val list: List<SomeTypeAlias>
}

Generated code

public fun MutableUiState(
    list: List<SomeTypeAlias<out TypeB>>
)

Expected

public fun MutableUiState(
    list: List<SomeTypeAlias>
)

tevjef avatar Aug 03 '22 17:08 tevjef

Thanks for reporting this @tevjef

PatilShreyas avatar Aug 06 '22 08:08 PatilShreyas

This is already a reported bug at KSP: https://github.com/google/ksp/issues/1011. Once this is officially fixed, we can fix here too. Till the time, this is blocked

PatilShreyas avatar Aug 08 '22 06:08 PatilShreyas