Switch kotlin version to 1.7

* Change 1.6 to 1.7 constants
* Fix SAFE_CALL_WILL_CHANGE_NULLABILITY for testData
* Change EXPOSED_PROPERTY_TYPE_IN_CONSTRUCTOR_WARNING to EXPOSED_PROPERTY_TYPE_IN_CONSTRUCTOR_ERROR
* Change NON_EXHAUSTIVE_WHEN_STATEMENT to NO_ELSE_IN_WHEN
* Fix testData for SafeCallsAreAlwaysNullable
* Change T -> T & Any in test dumps
* Change INVALID_CHARACTERS_NATIVE_WARNING -> INVALID_CHARACTERS_NATIVE_ERROR
* TYPECHECKER_HAS_RUN_INTO_RECURSIVE_PROBLEM_WARNING -> TYPECHECKER_HAS_RUN_INTO_RECURSIVE_PROBLEM_ERROR
This commit is contained in:
Mikhail Glukhikh
2021-12-23 17:55:36 +03:00
committed by Space
parent d741aaf82f
commit 53d6ac24e5
269 changed files with 624 additions and 1132 deletions
@@ -12,3 +12,4 @@ public open class A</*0*/ T : kotlin.Any!> {
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
}
@@ -12,3 +12,4 @@ public open class A</*0*/ T : kotlin.Any!> {
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
}
@@ -12,3 +12,4 @@ public open class A</*0*/ T : kotlin.Any!> {
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
}
@@ -12,3 +12,4 @@ public open class A</*0*/ T : kotlin.Any!> {
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
}
@@ -12,3 +12,4 @@ public open class A</*0*/ T : kotlin.Any!> {
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
}
@@ -64,7 +64,7 @@ fun safeCalls() {
val a = jsr.string?.length
val b = jsrNullable?.string?.length
val c = <!SAFE_CALL_WILL_CHANGE_NULLABILITY!>jb.string<!UNNECESSARY_SAFE_CALL!>?.<!>length<!>
val c = jb.string<!UNNECESSARY_SAFE_CALL!>?.<!>length
val d = jbNullable?.string?.length
val e = platform.string?.length
@@ -64,7 +64,7 @@ fun safeCalls() {
val a = jsr.string<!UNNECESSARY_SAFE_CALL!>?.<!>length
val b = jsrNullable?.string?.length
val c = <!SAFE_CALL_WILL_CHANGE_NULLABILITY!>jb.string<!UNNECESSARY_SAFE_CALL!>?.<!>length<!>
val c = jb.string<!UNNECESSARY_SAFE_CALL!>?.<!>length
val d = jbNullable?.string?.length
val e = platform.string?.length
@@ -51,7 +51,7 @@ fun main(a: A) {
a.field.length
a.field = null
<!SAFE_CALL_WILL_CHANGE_NULLABILITY!>a.nonNullField<!UNNECESSARY_SAFE_CALL!>?.<!>length<!>
a.nonNullField<!UNNECESSARY_SAFE_CALL!>?.<!>length
a.nonNullField.length
a.nonNullField = <!NULL_FOR_NONNULL_TYPE!>null<!>
}
@@ -51,7 +51,7 @@ fun main(a: A) {
<!RECEIVER_NULLABILITY_MISMATCH_BASED_ON_JAVA_ANNOTATIONS!>a.field<!>.length
a.field = null
<!SAFE_CALL_WILL_CHANGE_NULLABILITY!>a.nonNullField<!UNNECESSARY_SAFE_CALL!>?.<!>length<!>
a.nonNullField<!UNNECESSARY_SAFE_CALL!>?.<!>length
a.nonNullField.length
a.nonNullField = <!NULL_FOR_NONNULL_TYPE!>null<!>
}
@@ -52,7 +52,7 @@ fun main(a: A) {
a.field<!UNSAFE_CALL!>.<!>length
a.field = null
<!SAFE_CALL_WILL_CHANGE_NULLABILITY!>a.nonNullField<!UNNECESSARY_SAFE_CALL!>?.<!>length<!>
a.nonNullField<!UNNECESSARY_SAFE_CALL!>?.<!>length
a.nonNullField.length
a.nonNullField = <!NULL_FOR_NONNULL_TYPE!>null<!>
}
@@ -97,7 +97,7 @@ public class A {
// FILE: main.kt
fun main(a: A) {
<!SAFE_CALL_WILL_CHANGE_NULLABILITY!>a.foo("", null)<!UNNECESSARY_SAFE_CALL!>?.<!>length<!>
a.foo("", null)<!UNNECESSARY_SAFE_CALL!>?.<!>length
a.foo("", null).length
a.foo(<!NULL_FOR_NONNULL_TYPE!>null<!>, "").length
@@ -147,7 +147,7 @@ fun main(a: A, b: B, c: C) {
c.foo2(<!NULL_FOR_NONNULL_TYPE!>null<!>).length
c.foo3(<!NULL_FOR_NONNULL_TYPE!>null<!>).length
c.bar1(null).length
<!SAFE_CALL_WILL_CHANGE_NULLABILITY!>c.bar1(null)<!UNNECESSARY_SAFE_CALL!>?.<!>length<!>
c.bar1(null)<!UNNECESSARY_SAFE_CALL!>?.<!>length
c.bar2(null)<!UNSAFE_CALL!>.<!>length
c.baz(<!NULL_FOR_NONNULL_TYPE!>null<!>).length
}
@@ -127,7 +127,7 @@ public class A {
// FILE: main.kt
fun main(a: A, b: A.B, c: A.C) {
<!SAFE_CALL_WILL_CHANGE_NULLABILITY!>a.foo("", null)<!UNNECESSARY_SAFE_CALL!>?.<!>length<!>
a.foo("", null)<!UNNECESSARY_SAFE_CALL!>?.<!>length
a.foo("", null).length
a.foo(<!NULL_FOR_NONNULL_TYPE!>null<!>, "").length
@@ -137,7 +137,7 @@ fun main(a: A, b: A.B, c: A.C) {
a.bar().length
a.bar()<!UNNECESSARY_NOT_NULL_ASSERTION!>!!<!>.length
<!SAFE_CALL_WILL_CHANGE_NULLABILITY!>a.field<!UNNECESSARY_SAFE_CALL!>?.<!>length<!>
a.field<!UNNECESSARY_SAFE_CALL!>?.<!>length
a.field.length
a.baz()<!UNSAFE_CALL!>.<!>get(0)
@@ -150,7 +150,7 @@ fun main(a: A, b: A.B, c: A.C) {
b.foo(null, "")<!UNSAFE_CALL!>.<!>length
b.foobar(<!NULL_FOR_NONNULL_TYPE!>null<!>, "").length
<!SAFE_CALL_WILL_CHANGE_NULLABILITY!>b.foobar("", null)<!UNNECESSARY_SAFE_CALL!>?.<!>length<!>
b.foobar("", null)<!UNNECESSARY_SAFE_CALL!>?.<!>length
b.bar()<!UNSAFE_CALL!>.<!>length
b.bar()!!.length
@@ -163,7 +163,7 @@ fun main(a: A, b: A.B, c: A.C) {
b.baz()!!.get(0)?.get(0)
// c
<!SAFE_CALL_WILL_CHANGE_NULLABILITY!>c.foo("", null)<!UNNECESSARY_SAFE_CALL!>?.<!>length<!>
c.foo("", null)<!UNNECESSARY_SAFE_CALL!>?.<!>length
c.foo("", null).length
c.foo(<!NULL_FOR_NONNULL_TYPE!>null<!>, "").length
@@ -64,7 +64,7 @@ public class A {
// FILE: main.kt
fun main(a: A) {
<!SAFE_CALL_WILL_CHANGE_NULLABILITY!>a.foo("", null)<!UNNECESSARY_SAFE_CALL!>?.<!>length<!>
a.foo("", null)<!UNNECESSARY_SAFE_CALL!>?.<!>length
a.foo("", null).length
a.foo(<!NULL_FOR_NONNULL_TYPE!>null<!>, "").length
@@ -70,7 +70,7 @@ public class A {
// FILE: main.kt
fun main(a: test.A) {
<!SAFE_CALL_WILL_CHANGE_NULLABILITY!>a.foo("", null)<!UNNECESSARY_SAFE_CALL!>?.<!>length<!>
a.foo("", null)<!UNNECESSARY_SAFE_CALL!>?.<!>length
a.foo("", null).length
a.foo(<!NULL_FOR_NONNULL_TYPE!>null<!>, "").length
@@ -1,5 +1,7 @@
// FIR_IDENTICAL
// SKIP_TXT
// FILE: main.kt
sealed class ClientBootResult
object ClientBootSuccess : ClientBootResult()
@@ -1,35 +0,0 @@
package
public fun example(): Single<out ClientBootResult>
public sealed class ClientBootResult {
protected constructor ClientBootResult()
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
}
public object ClientBootSuccess : ClientBootResult {
private constructor ClientBootSuccess()
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
}
@FunctionalInterface /* annotation class not found */ public interface Function</*0*/ @io.reactivex.rxjava3.annotations.NonNull T : kotlin.Any!, /*1*/ @io.reactivex.rxjava3.annotations.NonNull R : kotlin.Any!> {
public abstract fun apply(/*0*/ t: T!): R!
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
}
public open class Single</*0*/ @io.reactivex.rxjava3.annotations.NonNull T : kotlin.Any!> {
public constructor Single</*0*/ @io.reactivex.rxjava3.annotations.NonNull T : kotlin.Any!>()
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
@io.reactivex.rxjava3.annotations.NonNull public final fun </*0*/ @io.reactivex.rxjava3.annotations.NonNull R : kotlin.Any!> map(/*0*/ @io.reactivex.rxjava3.annotations.NonNull mapper: @io.reactivex.rxjava3.annotations.NonNull Function<in T!, out R!>!): @io.reactivex.rxjava3.annotations.NonNull Single<R!>!
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
// Static members
@io.reactivex.rxjava3.annotations.NonNull public open fun </*0*/ @io.reactivex.rxjava3.annotations.NonNull T : kotlin.Any!> just(/*0*/ item: T!): @io.reactivex.rxjava3.annotations.NonNull Single<T!>!
}
@@ -1,4 +1,5 @@
// MUTE_FOR_PSI_CLASS_FILES_READING
// SKIP_TXT
// FILE: J1.java
import io.reactivex.rxjava3.annotations.*;
@@ -1,4 +1,5 @@
// MUTE_FOR_PSI_CLASS_FILES_READING
// SKIP_TXT
// FILE: J1.java
import io.reactivex.rxjava3.annotations.*;
@@ -1,10 +0,0 @@
package
public fun main(): kotlin.Unit
public open class J1</*0*/ @io.reactivex.rxjava3.annotations.NonNull T : kotlin.Any!> {
public constructor J1</*0*/ @io.reactivex.rxjava3.annotations.NonNull T : kotlin.Any!>()
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
}
@@ -15,6 +15,6 @@ public class A {
// FILE: main.kt
fun main(a: A) {
a.foo("").length
<!SAFE_CALL_WILL_CHANGE_NULLABILITY!>a.foo("")<!UNNECESSARY_SAFE_CALL!>?.<!>length<!>
<!SAFE_CALL_WILL_CHANGE_NULLABILITY!>a.foo(<!NULL_FOR_NONNULL_TYPE!>null<!>)<!UNNECESSARY_SAFE_CALL!>?.<!>length<!>
a.foo("")<!UNNECESSARY_SAFE_CALL!>?.<!>length
a.foo(<!NULL_FOR_NONNULL_TYPE!>null<!>)<!UNNECESSARY_SAFE_CALL!>?.<!>length
}
@@ -12,3 +12,4 @@ public open class A</*0*/ T : kotlin.Any!> {
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
}
@@ -12,3 +12,4 @@ public open class A</*0*/ T : kotlin.Any!> {
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
}