Minor, improve test on Java 9 modules
Test that unnamed module does not read unexported package of a named module
This commit is contained in:
+3
@@ -0,0 +1,3 @@
|
||||
package foo.impl;
|
||||
|
||||
public class Impl {}
|
||||
@@ -1 +1,7 @@
|
||||
OK
|
||||
compiler/testData/javaModules/unnamedDependsOnNamed/moduleB/usage.kt:2:17: error: symbol is declared in module 'moduleA' which does not export package 'foo.impl'
|
||||
import foo.impl.Impl
|
||||
^
|
||||
compiler/testData/javaModules/unnamedDependsOnNamed/moduleB/usage.kt:7:5: error: symbol is declared in module 'moduleA' which does not export package 'foo.impl'
|
||||
Impl() // should be error
|
||||
^
|
||||
COMPILATION_ERROR
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
import foo.Foo
|
||||
import foo.impl.Impl
|
||||
|
||||
fun usage() {
|
||||
Foo()
|
||||
Foo() // should be OK
|
||||
|
||||
Impl() // should be error
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user