Support foreign nullability annotations

#KT-10418 Fixed
 #KT-10594 Fixed
This commit is contained in:
Denis Zharkov
2016-01-11 22:04:31 +03:00
parent fd8a718797
commit f4613b8db1
41 changed files with 1236 additions and 8 deletions
@@ -0,0 +1,20 @@
// !DIAGNOSTICS: -UNUSED_VARIABLE -UNUSED_PARAMETER
// FILE: A.java
import lombok.*;
public class A {
@NonNull
public String foo(@NonNull String x) {
return "";
}
}
// FILE: main.kt
fun main(a: A) {
a.foo("").length
a.foo("")<!UNNECESSARY_SAFE_CALL!>?.<!>length
a.foo(<!NULL_FOR_NONNULL_TYPE!>null<!>)<!UNNECESSARY_SAFE_CALL!>?.<!>length
}