Refine diagnostics for nullability migration warnings
#KT-24911 Fixed
This commit is contained in:
Vendored
+3
-3
@@ -64,14 +64,14 @@ fun main(a: A) {
|
||||
a.field<!UNSAFE_CALL!>.<!>length
|
||||
|
||||
a.foo2("", null)?.length
|
||||
<!NULLABILITY_MISMATCH_BASED_ON_JAVA_ANNOTATIONS!>a.foo2("", null)<!>.length
|
||||
<!NULLABILITY_MISMATCH_BASED_ON_JAVA_ANNOTATIONS!>a.foo2(null, "")<!>.length
|
||||
<!RECEIVER_NULLABILITY_MISMATCH_BASED_ON_JAVA_ANNOTATIONS!>a.foo2("", null)<!>.length
|
||||
<!RECEIVER_NULLABILITY_MISMATCH_BASED_ON_JAVA_ANNOTATIONS!>a.foo2(null, "")<!>.length
|
||||
|
||||
a.bar2().length
|
||||
a.bar2()!!.length
|
||||
|
||||
a.field2?.length
|
||||
<!NULLABILITY_MISMATCH_BASED_ON_JAVA_ANNOTATIONS!>a.field2<!>.length
|
||||
<!RECEIVER_NULLABILITY_MISMATCH_BASED_ON_JAVA_ANNOTATIONS!>a.field2<!>.length
|
||||
|
||||
a.field3?.length
|
||||
a.field3<!UNSAFE_CALL!>.<!>length
|
||||
|
||||
Vendored
+3
-3
@@ -46,12 +46,12 @@ fun main(a: A) {
|
||||
a.field.length
|
||||
|
||||
a.foo2("", null)?.length
|
||||
<!NULLABILITY_MISMATCH_BASED_ON_JAVA_ANNOTATIONS!>a.foo2("", null)<!>.length
|
||||
<!NULLABILITY_MISMATCH_BASED_ON_JAVA_ANNOTATIONS!>a.foo2(<!NULL_FOR_NONNULL_TYPE!>null<!>, "")<!>.length
|
||||
<!RECEIVER_NULLABILITY_MISMATCH_BASED_ON_JAVA_ANNOTATIONS!>a.foo2("", null)<!>.length
|
||||
<!RECEIVER_NULLABILITY_MISMATCH_BASED_ON_JAVA_ANNOTATIONS!>a.foo2(<!NULL_FOR_NONNULL_TYPE!>null<!>, "")<!>.length
|
||||
|
||||
a.bar2().length
|
||||
a.bar2()<!UNNECESSARY_NOT_NULL_ASSERTION!>!!<!>.length
|
||||
|
||||
a.field2?.length
|
||||
<!NULLABILITY_MISMATCH_BASED_ON_JAVA_ANNOTATIONS!>a.field2<!>.length
|
||||
<!RECEIVER_NULLABILITY_MISMATCH_BASED_ON_JAVA_ANNOTATIONS!>a.field2<!>.length
|
||||
}
|
||||
|
||||
Vendored
+2
-2
@@ -66,7 +66,7 @@ fun main(b: B, c: C) {
|
||||
b.foo2()?.length
|
||||
b.foo3()<!UNSAFE_CALL!>.<!>length
|
||||
b.foo3()?.length
|
||||
<!NULLABILITY_MISMATCH_BASED_ON_JAVA_ANNOTATIONS!>b.foo4()<!>.length
|
||||
<!RECEIVER_NULLABILITY_MISMATCH_BASED_ON_JAVA_ANNOTATIONS!>b.foo4()<!>.length
|
||||
b.foo4()?.length
|
||||
|
||||
b.bar(<!NULL_FOR_NONNULL_TYPE!>null<!>)
|
||||
@@ -82,4 +82,4 @@ fun main(b: B, c: C) {
|
||||
c.foo4()?.length
|
||||
c.bar4(<!NULL_FOR_NONNULL_TYPE!>null<!>)
|
||||
c.bar4("")
|
||||
}
|
||||
}
|
||||
|
||||
Vendored
+3
-3
@@ -36,14 +36,14 @@ public class A {
|
||||
|
||||
fun main(a: A) {
|
||||
a.foo("", null)?.length
|
||||
<!NULLABILITY_MISMATCH_BASED_ON_JAVA_ANNOTATIONS!>a.foo("", null)<!>.length
|
||||
<!NULLABILITY_MISMATCH_BASED_ON_JAVA_ANNOTATIONS!>a.foo(<!NULLABILITY_MISMATCH_BASED_ON_JAVA_ANNOTATIONS!>null<!>, "")<!>.length
|
||||
<!RECEIVER_NULLABILITY_MISMATCH_BASED_ON_JAVA_ANNOTATIONS!>a.foo("", null)<!>.length
|
||||
<!RECEIVER_NULLABILITY_MISMATCH_BASED_ON_JAVA_ANNOTATIONS!>a.foo(<!NULLABILITY_MISMATCH_BASED_ON_JAVA_ANNOTATIONS!>null<!>, "")<!>.length
|
||||
|
||||
a.bar().length
|
||||
a.bar()<!UNNECESSARY_NOT_NULL_ASSERTION!>!!<!>.length
|
||||
|
||||
a.field?.length
|
||||
<!NULLABILITY_MISMATCH_BASED_ON_JAVA_ANNOTATIONS!>a.field<!>.length
|
||||
<!RECEIVER_NULLABILITY_MISMATCH_BASED_ON_JAVA_ANNOTATIONS!>a.field<!>.length
|
||||
|
||||
a.foo2("", null)?.length
|
||||
a.foo2("", null).length
|
||||
|
||||
Reference in New Issue
Block a user