From 31604702017a27ed97a9f4855aba86aefe2962f7 Mon Sep 17 00:00:00 2001 From: pyos Date: Thu, 6 Oct 2022 15:23:47 +0200 Subject: [PATCH] Minor: change a test to be more precise --- .../tests/smartCasts/implicitThisOrLocalVar.fir.kt | 10 +++++----- .../tests/smartCasts/implicitThisOrLocalVar.kt | 10 +++++----- .../tests/smartCasts/implicitThisOrLocalVar.txt | 2 +- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/compiler/testData/diagnostics/tests/smartCasts/implicitThisOrLocalVar.fir.kt b/compiler/testData/diagnostics/tests/smartCasts/implicitThisOrLocalVar.fir.kt index 7b58f63e906..394fa29f355 100644 --- a/compiler/testData/diagnostics/tests/smartCasts/implicitThisOrLocalVar.fir.kt +++ b/compiler/testData/diagnostics/tests/smartCasts/implicitThisOrLocalVar.fir.kt @@ -1,16 +1,16 @@ class Box(var item: String?) -fun take(it: T) {} +fun expectString(it: String) {} fun Box.test() { val other = Box("") myRun { if (item != null) { - take(item) + expectString(item) other.item = null - take(item) + expectString(item) this.item = null - take(item) + expectString(item) } } @@ -18,7 +18,7 @@ fun Box.test() { myRun { if (item != null) { this.item = null - take(item) + expectString(item) } } } diff --git a/compiler/testData/diagnostics/tests/smartCasts/implicitThisOrLocalVar.kt b/compiler/testData/diagnostics/tests/smartCasts/implicitThisOrLocalVar.kt index ea224ac5e12..851a093b646 100644 --- a/compiler/testData/diagnostics/tests/smartCasts/implicitThisOrLocalVar.kt +++ b/compiler/testData/diagnostics/tests/smartCasts/implicitThisOrLocalVar.kt @@ -1,16 +1,16 @@ class Box(var item: String?) -fun take(it: T) {} +fun expectString(it: String) {} fun Box.test() { val other = Box("") myRun { if (item != null) { - take(item) + expectString(item) other.item = null - take(item) + expectString(item) this.item = null - take(item) + expectString(item) } } @@ -18,7 +18,7 @@ fun Box.test() { myRun { if (item != null) { this.item = null - take(item) + expectString(item) } } } diff --git a/compiler/testData/diagnostics/tests/smartCasts/implicitThisOrLocalVar.txt b/compiler/testData/diagnostics/tests/smartCasts/implicitThisOrLocalVar.txt index 34d8e8a89f7..f6cf8113107 100644 --- a/compiler/testData/diagnostics/tests/smartCasts/implicitThisOrLocalVar.txt +++ b/compiler/testData/diagnostics/tests/smartCasts/implicitThisOrLocalVar.txt @@ -1,7 +1,7 @@ package +public fun expectString(/*0*/ it: kotlin.String): kotlin.Unit public fun myRun(/*0*/ block: () -> kotlin.Unit): kotlin.Unit -public fun take(/*0*/ it: T): kotlin.Unit public fun Box.test(): kotlin.Unit public final class Box {