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] Intersection types are not modeled #1846

Open
ZacSweers opened this issue Apr 17, 2024 · 5 comments · Fixed by #1880
Open

[KSP2] Intersection types are not modeled #1846

ZacSweers opened this issue Apr 17, 2024 · 5 comments · Fixed by #1880
Assignees
Labels
bug Something isn't working
Milestone

Comments

@ZacSweers
Copy link
Contributor

The following function reports no bounds for T in KSP2

fun <T> example() where T : Appendable, T : CharSequence {

}

In KSP 1 it correctly reports the Appendable and CharSequence bounds, but KSP2 reports no bounds

@ting-yuan ting-yuan added the bug Something isn't working label Apr 24, 2024
@ting-yuan ting-yuan added this to the 2.0 milestone Apr 24, 2024
@neetopia neetopia self-assigned this May 7, 2024
@ZacSweers
Copy link
Contributor Author

This remains broken in 2.0.0-1.0.21. Repro: square/kotlinpoet#1885

@neetopia neetopia reopened this May 22, 2024
@neetopia neetopia modified the milestones: 2.0, 2.1 May 22, 2024
@neetopia
Copy link
Collaborator

I think it should have been fixed, I pulled your repro to my local and it looks that the test is running the artifact from KCT, which is 1.0.20-RC1-1.020. I overrode the test classpath with a local build of KSP

constraints {
    implementation("com.google.devtools.ksp:symbol-processing-aa-embeddable:2.0.0-1.0.22")
  }

and test is passing, still, 1.0.21 won't work with KCT though due to #1908 therefore the local build, otherwise this type parameter bounds should be fine.

@ZacSweers
Copy link
Contributor Author

ahh, good catch. I'll try that + the latest snapshot

@ZacSweers
Copy link
Contributor Author

sidenote - could be useful for KSP to publish a bom given all the transitives?

@ZacSweers
Copy link
Contributor Author

Ah, just read #595

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants