You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This code works, but the import aliases aren't necessary. The following code compiles as well:
packageappimportkotlin.Unitimportpkg1.Fooimportpkg1.doSomethingimportpkg2.Barimportpkg2.doSomethingpublicfundoSomethingWith(foo:Foo): Unit {
foo.doSomething()
}
publicfundoSomethingWith(bar:Bar): Unit {
bar.doSomething()
}
Note though that this will not compile:
packageappimportpkg1.Fooimportpkg2.Foo
Describe the solution you'd like
The library should not treat member imports as conflicting if only their simple name matches, it should instead match by FQ name. Currently the matching logic is shared between member imports and type imports.
Describe alternatives you've considered
"Do nothing" is a good alternative here. This is purely a stylistic improvement and shouldn't have any effect on the correctness of generated code.
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
On 1.14.2, the following test case (posted in #1604):
produces the following output:
This code works, but the import aliases aren't necessary. The following code compiles as well:
Note though that this will not compile:
Describe the solution you'd like
The library should not treat member imports as conflicting if only their simple name matches, it should instead match by FQ name. Currently the matching logic is shared between member imports and type imports.
Describe alternatives you've considered
"Do nothing" is a good alternative here. This is purely a stylistic improvement and shouldn't have any effect on the correctness of generated code.
The text was updated successfully, but these errors were encountered: