From 64b42401a1d9a3867d3a877e70ebc509461dd143 Mon Sep 17 00:00:00 2001 From: Zalim Bashorov Date: Tue, 10 Nov 2020 03:52:31 +0300 Subject: [PATCH] [IR] update testdata: print a parameter in catch --- .../declarations/catchParameterInTopLevelProperty.kt.txt | 2 +- .../declarations/parameters/useNextParamInLambda.kt.txt | 2 +- .../ir/irText/expressions/catchParameterAccess.kt.txt | 2 +- compiler/testData/ir/irText/expressions/tryCatch.kt.txt | 4 ++-- .../ir/irText/expressions/tryCatchWithImplicitCast.kt.txt | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/compiler/testData/ir/irText/declarations/catchParameterInTopLevelProperty.kt.txt b/compiler/testData/ir/irText/declarations/catchParameterInTopLevelProperty.kt.txt index 3ceb39a0453..1fab95d1d69 100644 --- a/compiler/testData/ir/irText/declarations/catchParameterInTopLevelProperty.kt.txt +++ b/compiler/testData/ir/irText/declarations/catchParameterInTopLevelProperty.kt.txt @@ -1,7 +1,7 @@ val test: Unit field = try { // BLOCK } - catch (...) { // BLOCK + catch (e: Throwable){ // BLOCK } get diff --git a/compiler/testData/ir/irText/declarations/parameters/useNextParamInLambda.kt.txt b/compiler/testData/ir/irText/declarations/parameters/useNextParamInLambda.kt.txt index 557f34ee614..5979d533669 100644 --- a/compiler/testData/ir/irText/declarations/parameters/useNextParamInLambda.kt.txt +++ b/compiler/testData/ir/irText/declarations/parameters/useNextParamInLambda.kt.txt @@ -13,7 +13,7 @@ fun box(): String { try { // BLOCK f() /*~> Unit */ } - catch (...) { // BLOCK + catch (e: Exception){ // BLOCK result = "OK" } diff --git a/compiler/testData/ir/irText/expressions/catchParameterAccess.kt.txt b/compiler/testData/ir/irText/expressions/catchParameterAccess.kt.txt index 6b8a18927e0..59bba22372c 100644 --- a/compiler/testData/ir/irText/expressions/catchParameterAccess.kt.txt +++ b/compiler/testData/ir/irText/expressions/catchParameterAccess.kt.txt @@ -2,7 +2,7 @@ fun test(f: Function0) { return try { // BLOCK f.invoke() } - catch (...) { // BLOCK + catch (e: Exception){ // BLOCK throw e } diff --git a/compiler/testData/ir/irText/expressions/tryCatch.kt.txt b/compiler/testData/ir/irText/expressions/tryCatch.kt.txt index 999a57277cc..f66eb6cccc3 100644 --- a/compiler/testData/ir/irText/expressions/tryCatch.kt.txt +++ b/compiler/testData/ir/irText/expressions/tryCatch.kt.txt @@ -2,7 +2,7 @@ fun test1() { try { // BLOCK println() } - catch (...) { // BLOCK + catch (e: Throwable){ // BLOCK println() } finally { // BLOCK @@ -15,7 +15,7 @@ fun test2(): Int { println() 42 } - catch (...) { // BLOCK + catch (e: Throwable){ // BLOCK println() 24 } diff --git a/compiler/testData/ir/irText/expressions/tryCatchWithImplicitCast.kt.txt b/compiler/testData/ir/irText/expressions/tryCatchWithImplicitCast.kt.txt index 9dd92f483db..23eba47d908 100644 --- a/compiler/testData/ir/irText/expressions/tryCatchWithImplicitCast.kt.txt +++ b/compiler/testData/ir/irText/expressions/tryCatchWithImplicitCast.kt.txt @@ -5,7 +5,7 @@ fun testImplicitCast(a: Any) { val t: String = try { // BLOCK a } /*as String */ - catch (...) { // BLOCK + catch (e: Throwable){ // BLOCK "" }