-
Notifications
You must be signed in to change notification settings - Fork 289
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
KSType.toTypeName incorrectly resolves typealias type argument #1304
Comments
When However, when |
This still doesn't work in my case, although I can see that it's supposed to be fixed and there are even tests for it (the ones that I proposed above, btw). I used 1.14.2 and 1.15.0-SNAPSHOT.
However I still get this:
from this:
I narrowed it down to the fact, that in
the The resolution happens in
@ZacSweers @Egorand do you have any idea what might be the cause? I would be happy to provide a fix and a test case, but I can't quite find the issue that would cause the cache to get the wrong type argument. |
Not really sure what might be causing this... Does seem like a potential KSP issue? It might be interesting to isolate a test case that doesn't involve KotlinPoet code and file a KSP issue. |
I tried to do that but failed. Thought that you guys might understand the ksp internals a bit better than me. I have this test case in an open source repo, though. It's not pushed to github yet, but I could push it. Question is if you are interested in compiling a separate project to look into it, I understand you might not have time for that. |
For
typealias LeAlias = Map<Int, String>
, if I useKSTypeReference.toTypeName
I get excessively parameterized typealias if the typealias itself is a type param. Complicated 😅, so here's an example:kotlinpoet version: 1.12.0
The text was updated successfully, but these errors were encountered: