JPS: implement tracking of null annotations
#KT-12933 fixed
#KT-14266 fixed
This commit is contained in:
committed by
Dmitry Jemerov
parent
6d958eb32b
commit
05f278ce20
Vendored
+7
@@ -0,0 +1,7 @@
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
class A {
|
||||
void f(@Nullable String s) {
|
||||
System.out.println(s);
|
||||
}
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
class A {
|
||||
void f(@NotNull String s) {
|
||||
System.out.println(s);
|
||||
}
|
||||
}
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
internal class AChild : A() {
|
||||
override fun f(s: String?) {}
|
||||
}
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
internal class AChild : A() {
|
||||
override fun f(s: String) {}
|
||||
}
|
||||
jps-plugin/testData/incremental/withJava/javaUsedInKotlin/javaMethodParamNullabilityChanged/Dummy.kt
Vendored
+1
@@ -0,0 +1 @@
|
||||
class Dummy
|
||||
+47
@@ -0,0 +1,47 @@
|
||||
================ Step #1 =================
|
||||
|
||||
Cleaning output files:
|
||||
out/production/module/A.class
|
||||
End of files
|
||||
Exit code: NOTHING_DONE
|
||||
------------------------------------------
|
||||
Compiling files:
|
||||
src/A.java
|
||||
End of files
|
||||
Cleaning output files:
|
||||
out/production/module/AChild.class
|
||||
out/production/module/META-INF/module.kotlin_module
|
||||
out/production/module/UseAKt.class
|
||||
End of files
|
||||
Compiling files:
|
||||
src/AChild.kt
|
||||
src/useA.kt
|
||||
End of files
|
||||
Exit code: ABORT
|
||||
------------------------------------------
|
||||
COMPILATION FAILED
|
||||
'f' overrides nothing
|
||||
Null can not be a value of a non-null type String
|
||||
|
||||
================ Step #2 =================
|
||||
|
||||
Cleaning output files:
|
||||
out/production/module/A.class
|
||||
End of files
|
||||
Compiling files:
|
||||
src/AChild.kt
|
||||
src/useA.kt
|
||||
End of files
|
||||
Exit code: ADDITIONAL_PASS_REQUIRED
|
||||
------------------------------------------
|
||||
Compiling files:
|
||||
src/A.java
|
||||
End of files
|
||||
Cleaning output files:
|
||||
out/production/module/Dummy.class
|
||||
End of files
|
||||
Compiling files:
|
||||
src/Dummy.kt
|
||||
End of files
|
||||
Exit code: OK
|
||||
------------------------------------------
|
||||
+39
@@ -0,0 +1,39 @@
|
||||
================ Step #1 =================
|
||||
|
||||
Cleaning output files:
|
||||
out/production/module/A.class
|
||||
End of files
|
||||
Exit code: NOTHING_DONE
|
||||
------------------------------------------
|
||||
Compiling files:
|
||||
src/A.java
|
||||
End of files
|
||||
Cleaning output files:
|
||||
out/production/module/AChild.class
|
||||
out/production/module/META-INF/module.kotlin_module
|
||||
out/production/module/UseAKt.class
|
||||
End of files
|
||||
Compiling files:
|
||||
src/AChild.kt
|
||||
src/useA.kt
|
||||
End of files
|
||||
Exit code: ABORT
|
||||
------------------------------------------
|
||||
COMPILATION FAILED
|
||||
'f' overrides nothing
|
||||
Null can not be a value of a non-null type String
|
||||
|
||||
================ Step #2 =================
|
||||
|
||||
Cleaning output files:
|
||||
out/production/module/A.class
|
||||
End of files
|
||||
Compiling files:
|
||||
src/AChild.kt
|
||||
src/useA.kt
|
||||
End of files
|
||||
Exit code: OK
|
||||
------------------------------------------
|
||||
Compiling files:
|
||||
src/A.java
|
||||
End of files
|
||||
Vendored
+3
@@ -0,0 +1,3 @@
|
||||
fun useA() {
|
||||
A().f(null)
|
||||
}
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
fun useA() {
|
||||
A().f("useA")
|
||||
}
|
||||
Reference in New Issue
Block a user