Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[KSP2] Generic type arguments on typealiases are improperly forwarded to the KSType #2088

Closed
ZacSweers opened this issue Sep 6, 2024 · 0 comments · Fixed by #2157
Closed
Assignees
Labels
P1 major features or blocking bugs
Milestone

Comments

@ZacSweers
Copy link
Contributor

For the following example case, in KSP2 I'm finding that the KSType representing it has its arguments from the aliased type attached, when I would expect (and what I believe happens in KSP1) these arguments to only be on the aliased type

typealias BaseEmbedViewBinder = ViewBinder<out BaseViewHolder, out SpaceshipEmbedModel>

private val viewBinderProviders:
  Map<Class<out BaseViewHolder>, @JvmSuppressWildcards Provider<BaseEmbedViewBinder>>,

In this case, the KSType representing Provider<BaseEmbedViewBinder> is actually being represented as a KSTypeAlias with declaration BaseEmbedViewBinder and two type arguments <out BaseViewHolder, out SpaceshipEmbedModel>

image image image
@ting-yuan ting-yuan self-assigned this Oct 18, 2024
@ting-yuan ting-yuan added the P1 major features or blocking bugs label Oct 18, 2024
@ting-yuan ting-yuan added this to the 2.1 milestone Oct 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P1 major features or blocking bugs
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants