From 5f639dd2aee9c643b2b1974d6fca3be87ef17c87 Mon Sep 17 00:00:00 2001 From: Dmitriy Novozhilov Date: Mon, 20 Jan 2020 14:48:01 +0300 Subject: [PATCH] [FIR-TEST] Update testdata of old frontend tests --- .../diagnostics/tests/BinaryCallsOnNullableValues.fir.kt | 2 +- compiler/testData/diagnostics/tests/IncDec.fir.kt | 2 +- compiler/testData/diagnostics/tests/Nullability.fir.kt | 2 +- .../assignment/uninitializedValNullability.fir.kt | 2 +- .../nullableReceiverWithOverloadedMethod.fir.kt | 6 +++--- .../platformTypes/nullabilityWarnings/arithmetic.fir.kt | 2 +- .../platformTypes/rawTypes/rawTypeInUpperBound.fir.kt | 4 ++-- .../tests/smartCasts/castchecks/basicOff.fir.kt | 4 ++-- .../tests/smartCasts/castchecks/basicOn.fir.kt | 4 ++-- .../tests/smartCasts/castchecks/variables.fir.kt | 6 +++--- .../tests/smartCasts/comparisonUnderAnd.fir.kt | 2 +- .../diagnostics/tests/smartCasts/complexComparison.fir.kt | 2 +- .../tests/smartCasts/enumEntryMembers_after.fir.kt | 2 +- .../tests/smartCasts/enumEntryMembers_before.fir.kt | 2 +- .../diagnostics/tests/smartCasts/fieldExclExcl.fir.kt | 2 +- .../diagnostics/tests/smartCasts/fieldPlus.fir.kt | 2 +- .../diagnostics/tests/smartCasts/level_1_0.fir.kt | 4 ++-- .../tests/smartCasts/ownerDeclaresBothModifies.fir.kt | 2 +- .../testData/diagnostics/tests/smartCasts/safeAs.fir.kt | 6 +++--- .../smartCasts/safecalls/safeAccessReceiverNotNull.fir.kt | 8 ++++---- .../smartcastOnSameFieldOfDifferentInstances.fir.kt | 2 +- .../tests/smartCasts/variables/ifVarIsChanged.fir.kt | 2 +- .../tests/smartCasts/variables/whileWithBreak.fir.kt | 2 +- .../tests/smartCasts/varnotnull/assignment.fir.kt | 2 +- .../tests/smartCasts/varnotnull/boundInitializer.fir.kt | 2 +- .../smartCasts/varnotnull/boundInitializerWrong.fir.kt | 8 ++++---- .../varnotnull/capturedInClosureModifiedBefore.fir.kt | 2 +- .../tests/smartCasts/varnotnull/doWhileWithBreak.fir.kt | 6 +++--- .../smartCasts/varnotnull/doWhileWithMiddleBreak.fir.kt | 2 +- .../smartCasts/varnotnull/infiniteWhileWithBreak.fir.kt | 2 +- .../varnotnull/prefixNullableClassIncrement.fir.kt | 2 +- .../tests/smartCasts/varnotnull/setNotNullInTry.fir.kt | 2 +- .../tests/smartCasts/varnotnull/unnecessaryWithMap.fir.kt | 4 ++-- .../tests/smartCasts/varnotnull/whileTrue.fir.kt | 2 +- .../smartCasts/varnotnull/whileTrueWithBracketSet.fir.kt | 2 +- .../smartCasts/varnotnull/whileTrueWithBrackets.fir.kt | 2 +- .../tests/smartCasts/varnotnull/whileWithBreak.fir.kt | 2 +- .../smartcasts/letAlwaysChangesToNotNull.fir.kt | 2 +- .../testsWithStdLib/tryCatch/correctSmartcasts.fir.kt | 2 +- .../tryCatch/correctSmartcasts_after.fir.kt | 2 +- 40 files changed, 59 insertions(+), 59 deletions(-) diff --git a/compiler/testData/diagnostics/tests/BinaryCallsOnNullableValues.fir.kt b/compiler/testData/diagnostics/tests/BinaryCallsOnNullableValues.fir.kt index 2d3b17bca8e..cbbc4eb27b1 100644 --- a/compiler/testData/diagnostics/tests/BinaryCallsOnNullableValues.fir.kt +++ b/compiler/testData/diagnostics/tests/BinaryCallsOnNullableValues.fir.kt @@ -22,7 +22,7 @@ fun f(): Unit { x === 1 x !== 1 - x..2 + x..2 x in 1..2 val y : Boolean? = true diff --git a/compiler/testData/diagnostics/tests/IncDec.fir.kt b/compiler/testData/diagnostics/tests/IncDec.fir.kt index 71ddec78514..ae2a20e8b72 100644 --- a/compiler/testData/diagnostics/tests/IncDec.fir.kt +++ b/compiler/testData/diagnostics/tests/IncDec.fir.kt @@ -24,7 +24,7 @@ fun testWrongIncDec() { var x = WrongIncDec() x++ ++x - x-- + x-- --x } diff --git a/compiler/testData/diagnostics/tests/Nullability.fir.kt b/compiler/testData/diagnostics/tests/Nullability.fir.kt index c71b2e98286..5e1566d4f02 100644 --- a/compiler/testData/diagnostics/tests/Nullability.fir.kt +++ b/compiler/testData/diagnostics/tests/Nullability.fir.kt @@ -285,7 +285,7 @@ fun f8(b : String?, a : String) { b?.get(0) } else { - b.get(0) + b.get(0) } } diff --git a/compiler/testData/diagnostics/tests/dataFlow/assignment/uninitializedValNullability.fir.kt b/compiler/testData/diagnostics/tests/dataFlow/assignment/uninitializedValNullability.fir.kt index 9becb2e132a..4123fd8c1e4 100644 --- a/compiler/testData/diagnostics/tests/dataFlow/assignment/uninitializedValNullability.fir.kt +++ b/compiler/testData/diagnostics/tests/dataFlow/assignment/uninitializedValNullability.fir.kt @@ -10,6 +10,6 @@ fun test(a: Any?, flag: Boolean, x: Any?) { } else { b = x - b.hashCode() + b.hashCode() } } \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/nullableReceiverWithOverloadedMethod.fir.kt b/compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/nullableReceiverWithOverloadedMethod.fir.kt index 722a7a5af42..979f82d3b58 100644 --- a/compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/nullableReceiverWithOverloadedMethod.fir.kt +++ b/compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/nullableReceiverWithOverloadedMethod.fir.kt @@ -13,15 +13,15 @@ class B { fun f() { a = A() - a.f(true) - takeInt(a.f("")) + a.f(true) + takeInt(a.f("")) a.f() } fun g() { takeInt(if (3 > 2) { a = A() - a.f(true) + a.f(true) } else { 6 }) diff --git a/compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/arithmetic.fir.kt b/compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/arithmetic.fir.kt index 9bced64c4a5..c70fa9c521c 100644 --- a/compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/arithmetic.fir.kt +++ b/compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/arithmetic.fir.kt @@ -30,7 +30,7 @@ fun test() { ++platformJ platformNN++ - platformN++ + platformN++ platformJ++ 1 + platformNN diff --git a/compiler/testData/diagnostics/tests/platformTypes/rawTypes/rawTypeInUpperBound.fir.kt b/compiler/testData/diagnostics/tests/platformTypes/rawTypes/rawTypeInUpperBound.fir.kt index d6a67267f13..fa657b30e10 100644 --- a/compiler/testData/diagnostics/tests/platformTypes/rawTypes/rawTypeInUpperBound.fir.kt +++ b/compiler/testData/diagnostics/tests/platformTypes/rawTypes/rawTypeInUpperBound.fir.kt @@ -33,6 +33,6 @@ fun foo(x: B<*>) { Test.rawB.field = A() val anyA: A = Test.rawB.field - Test.rawB.field.consume("") - val y: Any = Test.rawB.field.produce() + Test.rawB.field.consume("") + val y: Any = Test.rawB.field.produce() } diff --git a/compiler/testData/diagnostics/tests/smartCasts/castchecks/basicOff.fir.kt b/compiler/testData/diagnostics/tests/smartCasts/castchecks/basicOff.fir.kt index f3c2e9eb6a4..76e4a3875e1 100644 --- a/compiler/testData/diagnostics/tests/smartCasts/castchecks/basicOff.fir.kt +++ b/compiler/testData/diagnostics/tests/smartCasts/castchecks/basicOff.fir.kt @@ -27,8 +27,8 @@ fun g(a: SomeClass?) { val c = a as? SomeSubClass if (c != null) { // 'a' and 'c' can be cast to SomeSubClass - a.hashCode() - a.foo + a.hashCode() + a.foo (a as? SomeSubClass).foo c.hashCode() c.foo diff --git a/compiler/testData/diagnostics/tests/smartCasts/castchecks/basicOn.fir.kt b/compiler/testData/diagnostics/tests/smartCasts/castchecks/basicOn.fir.kt index 0f44fb8b2b3..ad78556a7ef 100644 --- a/compiler/testData/diagnostics/tests/smartCasts/castchecks/basicOn.fir.kt +++ b/compiler/testData/diagnostics/tests/smartCasts/castchecks/basicOn.fir.kt @@ -27,8 +27,8 @@ fun g(a: SomeClass?) { val c = a as? SomeSubClass if (c != null) { // 'a' and 'c' can be cast to SomeSubClass - a.hashCode() - a.foo + a.hashCode() + a.foo (a as? SomeSubClass).foo c.hashCode() c.foo diff --git a/compiler/testData/diagnostics/tests/smartCasts/castchecks/variables.fir.kt b/compiler/testData/diagnostics/tests/smartCasts/castchecks/variables.fir.kt index ed43d37e403..bb8ea675b86 100644 --- a/compiler/testData/diagnostics/tests/smartCasts/castchecks/variables.fir.kt +++ b/compiler/testData/diagnostics/tests/smartCasts/castchecks/variables.fir.kt @@ -41,7 +41,7 @@ fun f(a: SomeClass?) { if (aa as? SomeSubClass != null) { aa = null // 'aa' cannot be cast to SomeSubClass - aa.hashCode() + aa.hashCode() aa.foo (aa as? SomeSubClass).foo (aa as SomeSubClass).foo @@ -59,8 +59,8 @@ fun f(a: SomeClass?) { val c = aa as? SomeSubClass if (c != null) { // 'c' can be cast to SomeSubClass - aa.hashCode() - aa.foo + aa.hashCode() + aa.foo (aa as? SomeSubClass).foo c.hashCode() c.foo diff --git a/compiler/testData/diagnostics/tests/smartCasts/comparisonUnderAnd.fir.kt b/compiler/testData/diagnostics/tests/smartCasts/comparisonUnderAnd.fir.kt index bd37527174d..d6f6a2b8607 100644 --- a/compiler/testData/diagnostics/tests/smartCasts/comparisonUnderAnd.fir.kt +++ b/compiler/testData/diagnostics/tests/smartCasts/comparisonUnderAnd.fir.kt @@ -33,7 +33,7 @@ fun foo(x : String?, y : String?) { } else { // Both not null - x.length + x.length y.length } } \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/smartCasts/complexComparison.fir.kt b/compiler/testData/diagnostics/tests/smartCasts/complexComparison.fir.kt index 99865dcca58..2165f847e7e 100644 --- a/compiler/testData/diagnostics/tests/smartCasts/complexComparison.fir.kt +++ b/compiler/testData/diagnostics/tests/smartCasts/complexComparison.fir.kt @@ -11,7 +11,7 @@ fun foo(x: String?, y: String?, z: String?, w: String?) { if (x == null || y == null || (x != z && y != z)) z.length else - z.length + z.length if (x != null && y == x && z == y && w == z) w.length else diff --git a/compiler/testData/diagnostics/tests/smartCasts/enumEntryMembers_after.fir.kt b/compiler/testData/diagnostics/tests/smartCasts/enumEntryMembers_after.fir.kt index e85df63e2f8..87ce27f6c51 100644 --- a/compiler/testData/diagnostics/tests/smartCasts/enumEntryMembers_after.fir.kt +++ b/compiler/testData/diagnostics/tests/smartCasts/enumEntryMembers_after.fir.kt @@ -12,7 +12,7 @@ fun printMessages() { Message.HELLO.text!! Message.HELLO.text.length - Message.NOTHING.text.length + Message.NOTHING.text.length Message.NOTHING.text!! Message.NOTHING.text.length diff --git a/compiler/testData/diagnostics/tests/smartCasts/enumEntryMembers_before.fir.kt b/compiler/testData/diagnostics/tests/smartCasts/enumEntryMembers_before.fir.kt index 85e9d6542f0..89598ff6aff 100644 --- a/compiler/testData/diagnostics/tests/smartCasts/enumEntryMembers_before.fir.kt +++ b/compiler/testData/diagnostics/tests/smartCasts/enumEntryMembers_before.fir.kt @@ -12,7 +12,7 @@ fun printMessages() { Message.HELLO.text!! Message.HELLO.text.length - Message.NOTHING.text.length + Message.NOTHING.text.length Message.NOTHING.text!! Message.NOTHING.text.length diff --git a/compiler/testData/diagnostics/tests/smartCasts/fieldExclExcl.fir.kt b/compiler/testData/diagnostics/tests/smartCasts/fieldExclExcl.fir.kt index af571c2a743..afb7de85564 100644 --- a/compiler/testData/diagnostics/tests/smartCasts/fieldExclExcl.fir.kt +++ b/compiler/testData/diagnostics/tests/smartCasts/fieldExclExcl.fir.kt @@ -7,6 +7,6 @@ fun foo() { var y: My? = My(42) if (y!!.x != null) { y = My(null) - y!!.x.hashCode() + y!!.x.hashCode() } } \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/smartCasts/fieldPlus.fir.kt b/compiler/testData/diagnostics/tests/smartCasts/fieldPlus.fir.kt index ee986476817..1546c9eb824 100644 --- a/compiler/testData/diagnostics/tests/smartCasts/fieldPlus.fir.kt +++ b/compiler/testData/diagnostics/tests/smartCasts/fieldPlus.fir.kt @@ -9,6 +9,6 @@ fun foo() { var y: My? = My(42) if (y!!.x != null) { y = My(null) - (y + My(0)).x.hashCode() + (y + My(0)).x.hashCode() } } \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/smartCasts/level_1_0.fir.kt b/compiler/testData/diagnostics/tests/smartCasts/level_1_0.fir.kt index c171d454ae6..e1328025d00 100644 --- a/compiler/testData/diagnostics/tests/smartCasts/level_1_0.fir.kt +++ b/compiler/testData/diagnostics/tests/smartCasts/level_1_0.fir.kt @@ -17,14 +17,14 @@ fun foo(arg: Int?) { var z = arg z = z?.let { 42 } if (z != null) { - arg.hashCode() + arg.hashCode() } } fun kt6840_1(s: String?) { val hash = s?.hashCode() if (hash != null) { - s.length + s.length } } diff --git a/compiler/testData/diagnostics/tests/smartCasts/ownerDeclaresBothModifies.fir.kt b/compiler/testData/diagnostics/tests/smartCasts/ownerDeclaresBothModifies.fir.kt index e6df621d176..9059f8bb307 100644 --- a/compiler/testData/diagnostics/tests/smartCasts/ownerDeclaresBothModifies.fir.kt +++ b/compiler/testData/diagnostics/tests/smartCasts/ownerDeclaresBothModifies.fir.kt @@ -9,5 +9,5 @@ fun foo(arg: Int?) { } if (x != null) x = 42 // Unsafe because of lambda - x.hashCode() + x.hashCode() } \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/smartCasts/safeAs.fir.kt b/compiler/testData/diagnostics/tests/smartCasts/safeAs.fir.kt index c5e38bcad56..814a65830bc 100644 --- a/compiler/testData/diagnostics/tests/smartCasts/safeAs.fir.kt +++ b/compiler/testData/diagnostics/tests/smartCasts/safeAs.fir.kt @@ -2,16 +2,16 @@ fun foo(arg: Any?) { val x = arg as? Any ?: return - arg.hashCode() + arg.hashCode() x.hashCode() } fun bar(arg: Any?) { arg as? Any ?: return - arg.hashCode() + arg.hashCode() } fun gav(arg: Any?) { arg as? String ?: return - arg.length + arg.length } diff --git a/compiler/testData/diagnostics/tests/smartCasts/safecalls/safeAccessReceiverNotNull.fir.kt b/compiler/testData/diagnostics/tests/smartCasts/safecalls/safeAccessReceiverNotNull.fir.kt index 6434bbd9bd8..4e93259c46b 100644 --- a/compiler/testData/diagnostics/tests/smartCasts/safecalls/safeAccessReceiverNotNull.fir.kt +++ b/compiler/testData/diagnostics/tests/smartCasts/safecalls/safeAccessReceiverNotNull.fir.kt @@ -7,7 +7,7 @@ fun kt6840_1(s: String?) { val hash = s?.hashCode() if (hash != null) { - s.length + s.length } } @@ -42,8 +42,8 @@ fun kt4565_1(a: SomeClass?) { val data = a?.data if (data != null) { data.hashCode() - a.hashCode() - a.data.hashCode() + a.hashCode() + a.data.hashCode() } if (a?.data != null) { // To be supported (?!) @@ -52,7 +52,7 @@ fun kt4565_1(a: SomeClass?) { a.data.hashCode() } if (a?.data is String) { - a.data.length + a.data.length data.length } } diff --git a/compiler/testData/diagnostics/tests/smartCasts/smartcastOnSameFieldOfDifferentInstances.fir.kt b/compiler/testData/diagnostics/tests/smartCasts/smartcastOnSameFieldOfDifferentInstances.fir.kt index b30d0201804..63d81705963 100644 --- a/compiler/testData/diagnostics/tests/smartCasts/smartcastOnSameFieldOfDifferentInstances.fir.kt +++ b/compiler/testData/diagnostics/tests/smartCasts/smartcastOnSameFieldOfDifferentInstances.fir.kt @@ -5,7 +5,7 @@ class A(val x: String?) { fun foo(other: A) { when { x == null && other.x == null -> "1" - x.length > 0 -> "2" + x.length > 0 -> "2" } } } \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/smartCasts/variables/ifVarIsChanged.fir.kt b/compiler/testData/diagnostics/tests/smartCasts/variables/ifVarIsChanged.fir.kt index 5f0fd9dcaf3..770d9dd55df 100644 --- a/compiler/testData/diagnostics/tests/smartCasts/variables/ifVarIsChanged.fir.kt +++ b/compiler/testData/diagnostics/tests/smartCasts/variables/ifVarIsChanged.fir.kt @@ -6,6 +6,6 @@ public fun foo() { var s: Any = "not null" if (s is String) { s = 42 - bar(s) + bar(s) } } diff --git a/compiler/testData/diagnostics/tests/smartCasts/variables/whileWithBreak.fir.kt b/compiler/testData/diagnostics/tests/smartCasts/variables/whileWithBreak.fir.kt index b34bb73ed5e..737f8147759 100644 --- a/compiler/testData/diagnostics/tests/smartCasts/variables/whileWithBreak.fir.kt +++ b/compiler/testData/diagnostics/tests/smartCasts/variables/whileWithBreak.fir.kt @@ -13,5 +13,5 @@ fun list(start: String) { e = e.next() } // e can never be null but we do not know it - e.hashCode() + e.hashCode() } \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/smartCasts/varnotnull/assignment.fir.kt b/compiler/testData/diagnostics/tests/smartCasts/varnotnull/assignment.fir.kt index 3149478be42..fabd049f830 100644 --- a/compiler/testData/diagnostics/tests/smartCasts/varnotnull/assignment.fir.kt +++ b/compiler/testData/diagnostics/tests/smartCasts/varnotnull/assignment.fir.kt @@ -7,5 +7,5 @@ fun foo() { v = null v.length v = "abc" - v.length + v.length } \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/smartCasts/varnotnull/boundInitializer.fir.kt b/compiler/testData/diagnostics/tests/smartCasts/varnotnull/boundInitializer.fir.kt index 60589b26bb1..ec71bd58969 100644 --- a/compiler/testData/diagnostics/tests/smartCasts/varnotnull/boundInitializer.fir.kt +++ b/compiler/testData/diagnostics/tests/smartCasts/varnotnull/boundInitializer.fir.kt @@ -15,6 +15,6 @@ fun foo(arg: Int?) { var z = arg z = z?.let { 42 } if (z != null) { - arg.hashCode() + arg.hashCode() } } diff --git a/compiler/testData/diagnostics/tests/smartCasts/varnotnull/boundInitializerWrong.fir.kt b/compiler/testData/diagnostics/tests/smartCasts/varnotnull/boundInitializerWrong.fir.kt index 7acef4daacf..55fdd3cde55 100644 --- a/compiler/testData/diagnostics/tests/smartCasts/varnotnull/boundInitializerWrong.fir.kt +++ b/compiler/testData/diagnostics/tests/smartCasts/varnotnull/boundInitializerWrong.fir.kt @@ -23,7 +23,7 @@ fun bar(s: String?) { val hashCode = ss?.hashCode() ss = null if (hashCode != null) { - ss.hashCode() + ss.hashCode() } } @@ -31,7 +31,7 @@ fun bar2(s: String?) { var ss = s val hashCode = ss?.hashCode() if (hashCode != null) { - ss.hashCode() + ss.hashCode() } } @@ -40,7 +40,7 @@ class Some(var s: String?) fun baz(arg: Some?) { val ss = arg?.s if (ss != null) { - arg.hashCode() - arg.s.hashCode() + arg.hashCode() + arg.s.hashCode() } } diff --git a/compiler/testData/diagnostics/tests/smartCasts/varnotnull/capturedInClosureModifiedBefore.fir.kt b/compiler/testData/diagnostics/tests/smartCasts/varnotnull/capturedInClosureModifiedBefore.fir.kt index 5a017f5d5b1..208823d186c 100644 --- a/compiler/testData/diagnostics/tests/smartCasts/varnotnull/capturedInClosureModifiedBefore.fir.kt +++ b/compiler/testData/diagnostics/tests/smartCasts/varnotnull/capturedInClosureModifiedBefore.fir.kt @@ -44,7 +44,7 @@ fun gaz(s: String?) { x = null } run { - x.hashCode() + x.hashCode() } } } diff --git a/compiler/testData/diagnostics/tests/smartCasts/varnotnull/doWhileWithBreak.fir.kt b/compiler/testData/diagnostics/tests/smartCasts/varnotnull/doWhileWithBreak.fir.kt index 3b1b5feabe3..4b3a3fe77df 100644 --- a/compiler/testData/diagnostics/tests/smartCasts/varnotnull/doWhileWithBreak.fir.kt +++ b/compiler/testData/diagnostics/tests/smartCasts/varnotnull/doWhileWithBreak.fir.kt @@ -11,11 +11,11 @@ fun list(start: SomeObject) { // In theory smart cast is possible here // But in practice we have a loop with changing e // ?: should we "or" entrance type info with condition type info? - if (!e.doSomething()) + if (!e.doSomething()) break // Smart cast here is still not possible - e = e.next() + e = e.next() } while (e != null) // e can be null because of next() - e.doSomething() + e.doSomething() } \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/smartCasts/varnotnull/doWhileWithMiddleBreak.fir.kt b/compiler/testData/diagnostics/tests/smartCasts/varnotnull/doWhileWithMiddleBreak.fir.kt index 2b916f90fb0..eb631f4c3a0 100644 --- a/compiler/testData/diagnostics/tests/smartCasts/varnotnull/doWhileWithMiddleBreak.fir.kt +++ b/compiler/testData/diagnostics/tests/smartCasts/varnotnull/doWhileWithMiddleBreak.fir.kt @@ -8,5 +8,5 @@ public fun foo(pp: String?): Int { p = null } while (!x()) // Smart cast is NOT possible here - return p.length + return p.length } \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/smartCasts/varnotnull/infiniteWhileWithBreak.fir.kt b/compiler/testData/diagnostics/tests/smartCasts/varnotnull/infiniteWhileWithBreak.fir.kt index f13e2013809..0f13f5c561c 100644 --- a/compiler/testData/diagnostics/tests/smartCasts/varnotnull/infiniteWhileWithBreak.fir.kt +++ b/compiler/testData/diagnostics/tests/smartCasts/varnotnull/infiniteWhileWithBreak.fir.kt @@ -16,5 +16,5 @@ fun list(start: SomeObject) { e = e.next() } // e can be null because of next() - e.doSomething() + e.doSomething() } \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/smartCasts/varnotnull/prefixNullableClassIncrement.fir.kt b/compiler/testData/diagnostics/tests/smartCasts/varnotnull/prefixNullableClassIncrement.fir.kt index b4bb5a201ee..a01f7ac8164 100644 --- a/compiler/testData/diagnostics/tests/smartCasts/varnotnull/prefixNullableClassIncrement.fir.kt +++ b/compiler/testData/diagnostics/tests/smartCasts/varnotnull/prefixNullableClassIncrement.fir.kt @@ -9,5 +9,5 @@ public fun box() { // type of j should be MyClass? var j = ++i // j is null so call should be unsafe - j.hashCode() + j.hashCode() } diff --git a/compiler/testData/diagnostics/tests/smartCasts/varnotnull/setNotNullInTry.fir.kt b/compiler/testData/diagnostics/tests/smartCasts/varnotnull/setNotNullInTry.fir.kt index 9fd03ec7f93..e380e336ffe 100644 --- a/compiler/testData/diagnostics/tests/smartCasts/varnotnull/setNotNullInTry.fir.kt +++ b/compiler/testData/diagnostics/tests/smartCasts/varnotnull/setNotNullInTry.fir.kt @@ -10,5 +10,5 @@ fun foo() { } catch (ex: Exception) {} bar(s) if (s != null) { } - s.hashCode() + s.hashCode() } \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/smartCasts/varnotnull/unnecessaryWithMap.fir.kt b/compiler/testData/diagnostics/tests/smartCasts/varnotnull/unnecessaryWithMap.fir.kt index 5265503fc10..e318583a437 100644 --- a/compiler/testData/diagnostics/tests/smartCasts/varnotnull/unnecessaryWithMap.fir.kt +++ b/compiler/testData/diagnostics/tests/smartCasts/varnotnull/unnecessaryWithMap.fir.kt @@ -13,8 +13,8 @@ class MyClass { var res = 0 m = create() // See KT-7428 - for ((k, v) in m) - res += (k.length + v.length) + for ((k, v) in m) + res += (k.length + v.length) return res } } \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/smartCasts/varnotnull/whileTrue.fir.kt b/compiler/testData/diagnostics/tests/smartCasts/varnotnull/whileTrue.fir.kt index 964baa75abc..c288987a722 100644 --- a/compiler/testData/diagnostics/tests/smartCasts/varnotnull/whileTrue.fir.kt +++ b/compiler/testData/diagnostics/tests/smartCasts/varnotnull/whileTrue.fir.kt @@ -9,5 +9,5 @@ public fun foo(pp: String?): Int { } // Smart cast is NOT possible here // (we could provide it but p = null makes it much harder) - return p.length + return p.length } \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/smartCasts/varnotnull/whileTrueWithBracketSet.fir.kt b/compiler/testData/diagnostics/tests/smartCasts/varnotnull/whileTrueWithBracketSet.fir.kt index 2fe1af49ac4..d2c647b41e5 100644 --- a/compiler/testData/diagnostics/tests/smartCasts/varnotnull/whileTrueWithBracketSet.fir.kt +++ b/compiler/testData/diagnostics/tests/smartCasts/varnotnull/whileTrueWithBracketSet.fir.kt @@ -9,5 +9,5 @@ public fun foo(pp: String?): Int { } // Smart cast is NOT possible here // (we could provide it but p = null makes it much harder) - return p.length + return p.length } \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/smartCasts/varnotnull/whileTrueWithBrackets.fir.kt b/compiler/testData/diagnostics/tests/smartCasts/varnotnull/whileTrueWithBrackets.fir.kt index 2c3a154ffdf..b2e4c1531a5 100644 --- a/compiler/testData/diagnostics/tests/smartCasts/varnotnull/whileTrueWithBrackets.fir.kt +++ b/compiler/testData/diagnostics/tests/smartCasts/varnotnull/whileTrueWithBrackets.fir.kt @@ -9,5 +9,5 @@ public fun foo(pp: String?): Int { } // Smart cast is NOT possible here // (we could provide it but p = null makes it much harder) - return p.length + return p.length } \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/smartCasts/varnotnull/whileWithBreak.fir.kt b/compiler/testData/diagnostics/tests/smartCasts/varnotnull/whileWithBreak.fir.kt index 0d5e3c38d9f..70f77472023 100644 --- a/compiler/testData/diagnostics/tests/smartCasts/varnotnull/whileWithBreak.fir.kt +++ b/compiler/testData/diagnostics/tests/smartCasts/varnotnull/whileWithBreak.fir.kt @@ -13,5 +13,5 @@ fun list(start: SomeObject) { e = e.next() } // e can be null because of next() - e.doSomething() + e.doSomething() } \ No newline at end of file diff --git a/compiler/testData/diagnostics/testsWithStdLib/smartcasts/letAlwaysChangesToNotNull.fir.kt b/compiler/testData/diagnostics/testsWithStdLib/smartcasts/letAlwaysChangesToNotNull.fir.kt index 3fa4b2468ec..74556f770bc 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/smartcasts/letAlwaysChangesToNotNull.fir.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/smartcasts/letAlwaysChangesToNotNull.fir.kt @@ -3,5 +3,5 @@ fun foo(y: String) { var x: String? = null y.let { x = it } - x.length // Smart cast is not possible + x.length // Smart cast is not possible } diff --git a/compiler/testData/diagnostics/testsWithStdLib/tryCatch/correctSmartcasts.fir.kt b/compiler/testData/diagnostics/testsWithStdLib/tryCatch/correctSmartcasts.fir.kt index 2170cb05df1..cb8f7e1632f 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/tryCatch/correctSmartcasts.fir.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/tryCatch/correctSmartcasts.fir.kt @@ -30,7 +30,7 @@ fun test2(s: String?) { requireNotNull(s) t2 = true } - t2.not() + t2.not() s.length } } diff --git a/compiler/testData/diagnostics/testsWithStdLib/tryCatch/correctSmartcasts_after.fir.kt b/compiler/testData/diagnostics/testsWithStdLib/tryCatch/correctSmartcasts_after.fir.kt index 67e4ab0e4cc..89584581b8c 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/tryCatch/correctSmartcasts_after.fir.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/tryCatch/correctSmartcasts_after.fir.kt @@ -31,7 +31,7 @@ fun test2(s: String?) { requireNotNull(s) t2 = true } - t2.not() + t2.not() s.length } }