-
Notifications
You must be signed in to change notification settings - Fork 294
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
Aliased imports not working for nested classes and generate unused imports and usage of FQNs #1838
Labels
Comments
As @Egorand recognized in #1839, I was not using the latest version 1.16.0 (I was using 1.15.3) - sorry! But this issue is still valid, although the behavior already changed a bit for the first case. The actual behavior there is now the same as for the last case: package org.example
import org.example.Person
import org.example.Person.Id as PID
public fun pid(): org.example.Person.Id = org.example.Person.Id() |
Yep, thanks @mcarleio, I was able to reproduce this one. The team will take a look! |
psymoon
added a commit
that referenced
this issue
Apr 1, 2024
2 tasks
psymoon
added a commit
that referenced
this issue
Apr 1, 2024
psymoon
added a commit
that referenced
this issue
Apr 1, 2024
psymoon
added a commit
that referenced
this issue
Apr 2, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
An aliased import added via
addAliasedImport
for a nested class seems to be never used, but still generates unused imports.To Reproduce
Expected behavior
Actual behavior
Additional context
If you change the package of the FileSpec to a different package than the nested class (e.g.
FileSpec.builder("org.elsewhere", "SomeFile")
) and run the same again, you will even get two unused imports and FQNs instead of the alias are used:expected
actual
The text was updated successfully, but these errors were encountered: