Skip to content

[KSP2] KSType.arguments return arguments on aliased type. #2325

@bcorso

Description

@bcorso

This seems like another case of #2088.

Suppose we have something like this:

val field: MyAlias<String>
typealias MyAlias<T> = Foo<Bar<T>, Baz<T>>

The KSType for the field gives a different result in KSP1 v KSP2.

// KSP1
fieldType.arguments // [String]

// KSP2
fieldType.arguments // [Bar<String>, Baz<String>]

I think KSP1 behavior is more correct in this case.

In particular, the KSType should represent the alias, MyAlias<String>, rather than the aliased type Foo<Bar<String>, Baz<String>>.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions