From d7c85406fbd5c46b5a9da015ac91ab2a6a8c9182 Mon Sep 17 00:00:00 2001 From: Dmitriy Novozhilov Date: Tue, 21 Jan 2020 15:47:13 +0300 Subject: [PATCH] [FIR-TEST] Mute some failing tests according to changes in DFA --- compiler/testData/diagnostics/tests/infos/SmartCasts.fir.kt | 2 +- .../diagnostics/tests/smartCasts/castchecks/variables.fir.kt | 4 ++-- .../smartCasts/safecalls/safeAccessReceiverNotNull.fir.kt | 2 +- .../tests/smartCasts/varnotnull/plusplusMinusminus.fir.kt | 2 +- .../testsWithStdLib/smartcasts/letMergeNotNull.fir.kt | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/compiler/testData/diagnostics/tests/infos/SmartCasts.fir.kt b/compiler/testData/diagnostics/tests/infos/SmartCasts.fir.kt index 091aaf5a166..93e5f16f7e9 100644 --- a/compiler/testData/diagnostics/tests/infos/SmartCasts.fir.kt +++ b/compiler/testData/diagnostics/tests/infos/SmartCasts.fir.kt @@ -196,7 +196,7 @@ fun mergeSmartCasts(a: Any?) { a.compareTo("") } when (a) { - is String, is Any -> a.compareTo("") + is String, is Any -> a.compareTo("") } if (a is String && a is Any) { val i: Int = a.compareTo("") diff --git a/compiler/testData/diagnostics/tests/smartCasts/castchecks/variables.fir.kt b/compiler/testData/diagnostics/tests/smartCasts/castchecks/variables.fir.kt index bb8ea675b86..dac9cd9c46c 100644 --- a/compiler/testData/diagnostics/tests/smartCasts/castchecks/variables.fir.kt +++ b/compiler/testData/diagnostics/tests/smartCasts/castchecks/variables.fir.kt @@ -27,8 +27,8 @@ fun g(a: SomeClass?) { c = Impl if (c != null) { // 'a' cannot 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/safecalls/safeAccessReceiverNotNull.fir.kt b/compiler/testData/diagnostics/tests/smartCasts/safecalls/safeAccessReceiverNotNull.fir.kt index 4e93259c46b..5051bd8e845 100644 --- a/compiler/testData/diagnostics/tests/smartCasts/safecalls/safeAccessReceiverNotNull.fir.kt +++ b/compiler/testData/diagnostics/tests/smartCasts/safecalls/safeAccessReceiverNotNull.fir.kt @@ -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/varnotnull/plusplusMinusminus.fir.kt b/compiler/testData/diagnostics/tests/smartCasts/varnotnull/plusplusMinusminus.fir.kt index dc2a9386d1f..2dbd452a6bd 100644 --- a/compiler/testData/diagnostics/tests/smartCasts/varnotnull/plusplusMinusminus.fir.kt +++ b/compiler/testData/diagnostics/tests/smartCasts/varnotnull/plusplusMinusminus.fir.kt @@ -2,7 +2,7 @@ fun foo(arg: Int?): Int { var i = arg if (i != null && i++ == 5) { - return i-- + i + return i-- + i } return 0 } diff --git a/compiler/testData/diagnostics/testsWithStdLib/smartcasts/letMergeNotNull.fir.kt b/compiler/testData/diagnostics/testsWithStdLib/smartcasts/letMergeNotNull.fir.kt index 833bb2fecce..6a9784436fc 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/smartcasts/letMergeNotNull.fir.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/smartcasts/letMergeNotNull.fir.kt @@ -4,6 +4,6 @@ fun foo(y: String?) { var x: String? = null if (x != null) { y?.let { x = it } - x.length // not-null or not-null + x.length // not-null or not-null } }