Release flag. Add diagnostics

This commit is contained in:
Mikhael Bogdanov
2021-11-10 10:58:03 +01:00
committed by Space
parent e5e3e9d326
commit c2d17ded33
20 changed files with 160 additions and 47 deletions
+1
View File
@@ -0,0 +1 @@
OK
@@ -0,0 +1,5 @@
package foo;
public class Foo {
val z: java.nio.ByteBuffer? = null
}
@@ -0,0 +1,5 @@
module module {
exports foo;
requires kotlin.stdlib;
}
@@ -0,0 +1 @@
OK
@@ -0,0 +1,5 @@
package foo;
public class Foo {
val z: java.nio.ByteBuffer? = null
}
@@ -0,0 +1,5 @@
module module11 {
exports foo;
requires kotlin.stdlib;
}
@@ -0,0 +1,4 @@
compiler/testData/javaModules/releaseFlag/moduleSwing/foo/Foo.kt:5:24: error: symbol is declared in module 'javafx.media' which current module does not depend on
val z: javax.swing.JFrame? = null
^
COMPILATION_ERROR
@@ -0,0 +1,6 @@
package foo;
public class Foo {
//no requirement
val z: javax.swing.JFrame? = null
}
@@ -0,0 +1,3 @@
package foo;
public class Foo2 {}
@@ -0,0 +1,5 @@
module moduleSwing {
exports foo;
requires kotlin.stdlib;
}
@@ -0,0 +1,3 @@
error: can't find modules signatures in `ct.sym` file for `-Xrelease=12` in $JDK11/lib/ct.sym
error: module java.base cannot be found in the module graph
COMPILATION_ERROR
@@ -0,0 +1,6 @@
package foo;
public class Foo {
val z: java.nio.ByteBuffer? = null
}
@@ -0,0 +1,2 @@
error: `5` is not valid value for `-Xrelease` flag.
COMPILATION_ERROR
@@ -0,0 +1,5 @@
package foo;
public class Foo {
val z: java.nio.ByteBuffer? = null
}