Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions compiler/src/dotty/tools/dotc/typer/Checking.scala
Original file line number Diff line number Diff line change
Expand Up @@ -1460,8 +1460,9 @@ trait Checking {
report.error(ImportRenamedTwice(sel.imported), sel.imported.srcPos)
seen += sel.name

for sel <- selectors do
if !sel.isWildcard then checkIdent(sel)
if !ctx.compilationUnit.isJava then
for sel <- selectors do
if !sel.isWildcard then checkIdent(sel)
end checkImportSelectors
}

Expand Down
6 changes: 6 additions & 0 deletions tests/pos/i15608/bar/Test.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
package bar

trait MDCAdapter

object ScalaMDCAdapter extends MDCAdapter {
}
20 changes: 20 additions & 0 deletions tests/pos/i15608/foo/JavaMDCBinder.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package foo;

import bar.MDCAdapter;
import bar.ScalaMDCAdapter;
import bar.ScalaMDCAdapter$;

public class JavaMDCBinder {
public static final JavaMDCBinder SINGLETON = new JavaMDCBinder();

private JavaMDCBinder() {
}

public MDCAdapter getMDCA() {
return ScalaMDCAdapter$.MODULE$;
}

public String getMDCAdapterClassStr() {
return ScalaMDCAdapter.class.getName();
}
}