Add test case for codeanalysis annotation
This commit is contained in:
committed by
Victor Petukhov
parent
dfb1cb8642
commit
2964d52640
@@ -18,6 +18,8 @@ public class A {
|
||||
|
||||
@DefaultNullable
|
||||
public String mixed(@NotNull String x) { return ""; }
|
||||
|
||||
public String explicitlyNullnessUnknown(@NullnessUnknown String x) { return ""; }
|
||||
}
|
||||
|
||||
// FILE: main.kt
|
||||
@@ -37,6 +39,10 @@ fun main(a: A) {
|
||||
a.mixed(<!NULL_FOR_NONNULL_TYPE!>null<!>)?.length
|
||||
a.mixed("")?.length
|
||||
|
||||
a.explicitlyNullnessUnknown("").length
|
||||
a.explicitlyNullnessUnknown("")<!UNNECESSARY_SAFE_CALL!>?.<!>length
|
||||
a.explicitlyNullnessUnknown(null).length
|
||||
|
||||
a.defaultField<!UNNECESSARY_SAFE_CALL!>?.<!>length
|
||||
a.defaultField.length
|
||||
|
||||
|
||||
Reference in New Issue
Block a user