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
Unlike future dotty, there is no warning for the inner import, most likely because the compiler picks it after reconciling with the outer import. It would be equally valid to pick the higher-precedence binding.
Conversely, it's desirable perhaps to "use" the import of smallest scope and report the other unused if possible. That is, this is where separate analysis shines: the compiler behavior per se doesn't matter for "minimizing" imports.
If the outer import were also wildcard, and so, equal precedence, it's also preferable to warn about the inner import. For simplicity, pick the highest precedence, outermost import as "canonical form".
Problem
Unlike future dotty, there is no warning for the inner import, most likely because the compiler picks it after reconciling with the outer import. It would be equally valid to pick the higher-precedence binding.
Conversely, it's desirable perhaps to "use" the import of smallest scope and report the other unused if possible. That is, this is where separate analysis shines: the compiler behavior per se doesn't matter for "minimizing" imports.
If the outer import were also wildcard, and so, equal precedence, it's also preferable to warn about the inner import. For simplicity, pick the highest precedence, outermost import as "canonical form".
The example is due to scala/scala3#21917
The text was updated successfully, but these errors were encountered: