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
@@ -8,7 +8,7 @@ fun foo(my: My) {
if (my.x != null) {
// my.x should be smart-cast
if (my.x) doIt()
<!NON_EXHAUSTIVE_WHEN_STATEMENT!>when<!> (my.x) {
<!NO_ELSE_IN_WHEN!>when<!> (my.x) {
true -> doIt()
}
when {
@@ -21,7 +21,7 @@ fun bar(x: Boolean?) {
if (x != null) {
// x should be smart-cast
if (x) doIt()
<!NON_EXHAUSTIVE_WHEN_STATEMENT!>when<!> (x) {
<!NO_ELSE_IN_WHEN!>when<!> (x) {
true -> doIt()
}
when {
@@ -8,7 +8,7 @@ fun foo(my: My) {
if (my.x != null) {
// my.x should be smart-cast
if (<!DEBUG_INFO_SMARTCAST!>my.x<!>) doIt()
<!NON_EXHAUSTIVE_WHEN_STATEMENT!>when<!> (<!DEBUG_INFO_SMARTCAST!>my.x<!>) {
<!NO_ELSE_IN_WHEN!>when<!> (<!DEBUG_INFO_SMARTCAST!>my.x<!>) {
true -> doIt()
}
when {
@@ -21,7 +21,7 @@ fun bar(x: Boolean?) {
if (x != null) {
// x should be smart-cast
if (<!DEBUG_INFO_SMARTCAST!>x<!>) doIt()
<!NON_EXHAUSTIVE_WHEN_STATEMENT!>when<!> (<!DEBUG_INFO_SMARTCAST!>x<!>) {
<!NO_ELSE_IN_WHEN!>when<!> (<!DEBUG_INFO_SMARTCAST!>x<!>) {
true -> doIt()
}
when {
@@ -5,7 +5,7 @@ fun test(foo: Foo?) {
// Correct
foo.bar?.length
// Unnecessary
<!SAFE_CALL_WILL_CHANGE_NULLABILITY!>foo<!UNNECESSARY_SAFE_CALL!>?.<!>bar<!>?.length
foo<!UNNECESSARY_SAFE_CALL!>?.<!>bar?.length
}
<!SAFE_CALL_WILL_CHANGE_NULLABILITY!>foo.bar<!UNNECESSARY_SAFE_CALL!>?.<!>length<!>
foo.bar<!UNNECESSARY_SAFE_CALL!>?.<!>length
}
@@ -5,7 +5,7 @@ fun test(foo: Foo?) {
// Correct
<!DEBUG_INFO_SMARTCAST!>foo<!>.bar?.length
// Unnecessary
<!SAFE_CALL_WILL_CHANGE_NULLABILITY!>foo<!UNNECESSARY_SAFE_CALL!>?.<!>bar<!>?.length
foo<!UNNECESSARY_SAFE_CALL!>?.<!>bar?.length
}
<!DEBUG_INFO_SMARTCAST!>foo<!>.bar?.length
}