Skip to content

KSType.toTypeName incorrectly resolves typealias type argument #2161

@robertfmurdock

Description

@robertfmurdock

In some scenarios (apparently not all), resolving a typealias will include extra generic information.

typealias ReloadFunc = ()->Unit

will in some scenarios appear as ReloadFunc, but in others will appear as ReloadFunc<Unit>, blending the underlying type's generics with the typealias.

This appears to have cropped up in KSP2, as I discovered this after removing the "useKSP2=false" property, and I out popped some cases where generated code has this problem.

To Reproduce

In my example the 'working' case is using FunSpec.builder, and the 'not working' case is using 'ParameterSpec.builder', but I couldn't tell you if its related or not.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions