Report warning for several modules with same name on module path
This commit is contained in:
+3
@@ -0,0 +1,3 @@
|
||||
package foo;
|
||||
|
||||
public class Foo {}
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
module dependency {
|
||||
exports foo;
|
||||
}
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
package bar;
|
||||
|
||||
public class Bar {}
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
module dependency {
|
||||
exports bar;
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
compiler/testData/javaModules/severalModulesWithTheSameName/main/usage.kt:2:8: error: unresolved reference: bar
|
||||
import bar.Bar
|
||||
^
|
||||
compiler/testData/javaModules/severalModulesWithTheSameName/main/usage.kt:6:12: error: unresolved reference: Bar
|
||||
val b: Bar = Bar()
|
||||
^
|
||||
compiler/testData/javaModules/severalModulesWithTheSameName/main/usage.kt:6:18: error: unresolved reference: Bar
|
||||
val b: Bar = Bar()
|
||||
^
|
||||
$TMP_DIR$/dependency2.jar: warning: the root is ignored because a module with the same name 'dependency' has been found earlier on the module path at: $TMP_DIR$/dependency1.jar
|
||||
COMPILATION_ERROR
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
module main {
|
||||
requires dependency;
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
import foo.Foo
|
||||
import bar.Bar
|
||||
|
||||
fun usage(): String {
|
||||
val f: Foo = Foo()
|
||||
val b: Bar = Bar()
|
||||
return "$f$b"
|
||||
}
|
||||
Reference in New Issue
Block a user