Skip to content

Kotlin 2.2.0 seems to break NavArgs that use TypeAlias #757

@cwsiteplan

Description

@cwsiteplan

using latest library version (2.2.0)

Having NavArgs:

typealias ProjectLayerId = String?

data class CreateMarkerNavArgs(
    val projectId: String,
    val preselectedLayerId: ProjectLayerId,
)

since i upgraded to kotlin 2.2.0 and ksp to 2.2.0-2.0.2
it breaks the build bc. generated destination does not pick up the nullability from the typealias

public operator fun invoke(
		projectId: String,
		preselectedLayerId: String, <-- should be nullable
    ): Direction {

it works fine when using kotlin 2.1.20 and corresponding ksp (2.1.20-1.0.31)
probably a bug/change in KSP?

ofc the nullability inside the typealias maybe not ideal and should probably be a nullable value class instead - still wanted to report that.

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