From 58a010464af8aa66a29268738874af839d5566fc Mon Sep 17 00:00:00 2001 From: Ilya Gorbunov Date: Fri, 12 Aug 2016 19:40:42 +0300 Subject: [PATCH] Exception typealiases rendering in test output (CFG) --- .../testData/cfg-variables/bugs/kt4764.values | 52 +++++------ .../lexicalScopes/tryScope.values | 20 ++--- .../cfg/controlStructures/Finally.values | 90 +++++++++---------- .../controlStructures/FinallyTestCopy.values | 88 +++++++++--------- .../cfg/tailCalls/tryCatchFinally.values | 18 ++-- 5 files changed, 134 insertions(+), 134 deletions(-) diff --git a/compiler/testData/cfg-variables/bugs/kt4764.values b/compiler/testData/cfg-variables/bugs/kt4764.values index 02b74a6e068..2987225d704 100644 --- a/compiler/testData/cfg-variables/bugs/kt4764.values +++ b/compiler/testData/cfg-variables/bugs/kt4764.values @@ -22,36 +22,36 @@ fun sample(): String? { return null } --------------------- - : {<: Exception} NEW: magic[FAKE_INITIALIZER](e: Exception) -> -false : Boolean NEW: r(false) -> -"fail" : {<: String?} NEW: r("fail") -> + : {<: Exception /* = Exception */} NEW: magic[FAKE_INITIALIZER](e: Exception) -> +false : Boolean NEW: r(false) -> +"fail" : {<: String?} NEW: r("fail") -> return "fail" !: * -{ return "fail" } !: * COPY -false : Boolean NEW: r(false) -> -false : Boolean NEW: r(false) -> -null : {<: String?} NEW: r(null) -> -"test" : {<: String?} NEW: r("test") -> +{ return "fail" } !: * COPY +false : Boolean NEW: r(false) -> +false : Boolean NEW: r(false) -> +null : {<: String?} NEW: r(null) -> +"test" : {<: String?} NEW: r("test") -> foo = "test" !: * -{ foo = "test" } !: * COPY -"fail" : {<: String?} NEW: r("fail") -> +{ foo = "test" } !: * COPY +"fail" : {<: String?} NEW: r("fail") -> return "fail" !: * -{ return "fail" } !: * COPY +{ return "fail" } !: * COPY println !: * -foo : * NEW: r(foo) -> -println(foo) : * NEW: magic[UNRESOLVED_CALL](println(foo)|, !) -> -{ println(foo) // Variable 'foo' must be initialized } : * COPY -try { foo = "test" } catch (e: Exception) { return "fail" } finally { println(foo) // Variable 'foo' must be initialized } : * NEW: merge(try { foo = "test" } catch (e: Exception) { return "fail" } finally { println(foo) // Variable 'foo' must be initialized }|!, !) -> -{ var foo: String? = null try { foo = "test" } catch (e: Exception) { return "fail" } finally { println(foo) // Variable 'foo' must be initialized } } : * COPY -if (false) { var foo: String? = null try { foo = "test" } catch (e: Exception) { return "fail" } finally { println(foo) // Variable 'foo' must be initialized } } : * NEW: merge(if (false) { var foo: String? = null try { foo = "test" } catch (e: Exception) { return "fail" } finally { println(foo) // Variable 'foo' must be initialized } }|) -> -"fail" : {<: String?} NEW: r("fail") -> +foo : * NEW: r(foo) -> +println(foo) : * NEW: magic[UNRESOLVED_CALL](println(foo)|, !) -> +{ println(foo) // Variable 'foo' must be initialized } : * COPY +try { foo = "test" } catch (e: Exception) { return "fail" } finally { println(foo) // Variable 'foo' must be initialized } : * NEW: merge(try { foo = "test" } catch (e: Exception) { return "fail" } finally { println(foo) // Variable 'foo' must be initialized }|!, !) -> +{ var foo: String? = null try { foo = "test" } catch (e: Exception) { return "fail" } finally { println(foo) // Variable 'foo' must be initialized } } : * COPY +if (false) { var foo: String? = null try { foo = "test" } catch (e: Exception) { return "fail" } finally { println(foo) // Variable 'foo' must be initialized } } : * NEW: merge(if (false) { var foo: String? = null try { foo = "test" } catch (e: Exception) { return "fail" } finally { println(foo) // Variable 'foo' must be initialized } }|) -> +"fail" : {<: String?} NEW: r("fail") -> return "fail" !: * -{ if (false) { var foo: String? = null try { foo = "test" } catch (e: Exception) { return "fail" } finally { println(foo) // Variable 'foo' must be initialized } } return "fail" } !: * COPY -if (false) { if (false) { var foo: String? = null try { foo = "test" } catch (e: Exception) { return "fail" } finally { println(foo) // Variable 'foo' must be initialized } } return "fail" } : * NEW: merge(if (false) { if (false) { var foo: String? = null try { foo = "test" } catch (e: Exception) { return "fail" } finally { println(foo) // Variable 'foo' must be initialized } } return "fail" }|!) -> -{ if (false) { if (false) { var foo: String? = null try { foo = "test" } catch (e: Exception) { return "fail" } finally { println(foo) // Variable 'foo' must be initialized } } return "fail" } } : * COPY -if (false) { return "fail" } else { if (false) { if (false) { var foo: String? = null try { foo = "test" } catch (e: Exception) { return "fail" } finally { println(foo) // Variable 'foo' must be initialized } } return "fail" } } : * NEW: merge(if (false) { return "fail" } else { if (false) { if (false) { var foo: String? = null try { foo = "test" } catch (e: Exception) { return "fail" } finally { println(foo) // Variable 'foo' must be initialized } } return "fail" } }|!, ) -> -{ if (false) { return "fail" } else { if (false) { if (false) { var foo: String? = null try { foo = "test" } catch (e: Exception) { return "fail" } finally { println(foo) // Variable 'foo' must be initialized } } return "fail" } } } : * COPY -try { if (false) { return "fail" } else { if (false) { if (false) { var foo: String? = null try { foo = "test" } catch (e: Exception) { return "fail" } finally { println(foo) // Variable 'foo' must be initialized } } return "fail" } } } finally {} : * NEW: merge(try { if (false) { return "fail" } else { if (false) { if (false) { var foo: String? = null try { foo = "test" } catch (e: Exception) { return "fail" } finally { println(foo) // Variable 'foo' must be initialized } } return "fail" } } } finally {}|) -> -null : {<: String?} NEW: r(null) -> +{ if (false) { var foo: String? = null try { foo = "test" } catch (e: Exception) { return "fail" } finally { println(foo) // Variable 'foo' must be initialized } } return "fail" } !: * COPY +if (false) { if (false) { var foo: String? = null try { foo = "test" } catch (e: Exception) { return "fail" } finally { println(foo) // Variable 'foo' must be initialized } } return "fail" } : * NEW: merge(if (false) { if (false) { var foo: String? = null try { foo = "test" } catch (e: Exception) { return "fail" } finally { println(foo) // Variable 'foo' must be initialized } } return "fail" }|!) -> +{ if (false) { if (false) { var foo: String? = null try { foo = "test" } catch (e: Exception) { return "fail" } finally { println(foo) // Variable 'foo' must be initialized } } return "fail" } } : * COPY +if (false) { return "fail" } else { if (false) { if (false) { var foo: String? = null try { foo = "test" } catch (e: Exception) { return "fail" } finally { println(foo) // Variable 'foo' must be initialized } } return "fail" } } : * NEW: merge(if (false) { return "fail" } else { if (false) { if (false) { var foo: String? = null try { foo = "test" } catch (e: Exception) { return "fail" } finally { println(foo) // Variable 'foo' must be initialized } } return "fail" } }|!, ) -> +{ if (false) { return "fail" } else { if (false) { if (false) { var foo: String? = null try { foo = "test" } catch (e: Exception) { return "fail" } finally { println(foo) // Variable 'foo' must be initialized } } return "fail" } } } : * COPY +try { if (false) { return "fail" } else { if (false) { if (false) { var foo: String? = null try { foo = "test" } catch (e: Exception) { return "fail" } finally { println(foo) // Variable 'foo' must be initialized } } return "fail" } } } finally {} : * NEW: merge(try { if (false) { return "fail" } else { if (false) { if (false) { var foo: String? = null try { foo = "test" } catch (e: Exception) { return "fail" } finally { println(foo) // Variable 'foo' must be initialized } } return "fail" } } } finally {}|) -> +null : {<: String?} NEW: r(null) -> return null !: * -{ try { if (false) { return "fail" } else { if (false) { if (false) { var foo: String? = null try { foo = "test" } catch (e: Exception) { return "fail" } finally { println(foo) // Variable 'foo' must be initialized } } return "fail" } } } finally {} return null } !: * COPY +{ try { if (false) { return "fail" } else { if (false) { if (false) { var foo: String? = null try { foo = "test" } catch (e: Exception) { return "fail" } finally { println(foo) // Variable 'foo' must be initialized } } return "fail" } } } finally {} return null } !: * COPY ===================== diff --git a/compiler/testData/cfg-variables/lexicalScopes/tryScope.values b/compiler/testData/cfg-variables/lexicalScopes/tryScope.values index 5a15f3baf77..ea305dade5d 100644 --- a/compiler/testData/cfg-variables/lexicalScopes/tryScope.values +++ b/compiler/testData/cfg-variables/lexicalScopes/tryScope.values @@ -13,14 +13,14 @@ fun foo() { "after" } --------------------- - : {<: Exception} NEW: magic[FAKE_INITIALIZER](e: Exception) -> -"before" : * NEW: r("before") -> -foo() : * NEW: call(foo(), foo) -> -{ foo() } : * COPY -e : {<: Exception} NEW: r(e) -> -{ val a = e } !: * -1 : Int NEW: r(1) -> -try { foo() } catch (e: Exception) { val a = e } finally { val a = 1 } : * NEW: merge(try { foo() } catch (e: Exception) { val a = e } finally { val a = 1 }|, !) -> -"after" : * NEW: r("after") -> -{ "before" try { foo() } catch (e: Exception) { val a = e } finally { val a = 1 } "after" } : * COPY + : {<: Exception /* = Exception */} NEW: magic[FAKE_INITIALIZER](e: Exception) -> +"before" : * NEW: r("before") -> +foo() : * NEW: call(foo(), foo) -> +{ foo() } : * COPY +e : {<: Exception /* = Exception */} NEW: r(e) -> +{ val a = e } !: * +1 : Int NEW: r(1) -> +try { foo() } catch (e: Exception) { val a = e } finally { val a = 1 } : * NEW: merge(try { foo() } catch (e: Exception) { val a = e } finally { val a = 1 }|, !) -> +"after" : * NEW: r("after") -> +{ "before" try { foo() } catch (e: Exception) { val a = e } finally { val a = 1 } "after" } : * COPY ===================== diff --git a/compiler/testData/cfg/controlStructures/Finally.values b/compiler/testData/cfg/controlStructures/Finally.values index e4147236134..15c39869f82 100644 --- a/compiler/testData/cfg/controlStructures/Finally.values +++ b/compiler/testData/cfg/controlStructures/Finally.values @@ -376,18 +376,18 @@ fun t13() : Int { } } --------------------- - : {<: UnsupportedOperationException} NEW: magic[FAKE_INITIALIZER](e: UnsupportedOperationException) -> -1 : Int NEW: r(1) -> -return 1 !: * -{ return 1 } !: * COPY -2 : Int NEW: r(2) -> -doSmth(2) : * NEW: call(doSmth(2), doSmth|) -> -{ doSmth(2) } : * COPY -3 : Int NEW: r(3) -> -doSmth(3) : * NEW: call(doSmth(3), doSmth|) -> -{ doSmth(3) } : * COPY -try { return 1 } catch (e: UnsupportedOperationException) { doSmth(2) } finally { doSmth(3) } : * NEW: merge(try { return 1 } catch (e: UnsupportedOperationException) { doSmth(2) } finally { doSmth(3) }|!, ) -> -{ try { return 1 } catch (e: UnsupportedOperationException) { doSmth(2) } finally { doSmth(3) } } : * COPY + : {<: UnsupportedOperationException /* = UnsupportedOperationException */} NEW: magic[FAKE_INITIALIZER](e: UnsupportedOperationException) -> +1 : Int NEW: r(1) -> +return 1 !: * +{ return 1 } !: * COPY +2 : Int NEW: r(2) -> +doSmth(2) : * NEW: call(doSmth(2), doSmth|) -> +{ doSmth(2) } : * COPY +3 : Int NEW: r(3) -> +doSmth(3) : * NEW: call(doSmth(3), doSmth|) -> +{ doSmth(3) } : * COPY +try { return 1 } catch (e: UnsupportedOperationException) { doSmth(2) } finally { doSmth(3) } : * NEW: merge(try { return 1 } catch (e: UnsupportedOperationException) { doSmth(2) } finally { doSmth(3) }|!, ) -> +{ try { return 1 } catch (e: UnsupportedOperationException) { doSmth(2) } finally { doSmth(3) } } : * COPY ===================== == t14 == fun t14() : Int { @@ -399,15 +399,15 @@ fun t14() : Int { } } --------------------- - : {<: UnsupportedOperationException} NEW: magic[FAKE_INITIALIZER](e: UnsupportedOperationException) -> -1 : Int NEW: r(1) -> -return 1 !: * -{ return 1 } !: * COPY -2 : Int NEW: r(2) -> -doSmth(2) : * NEW: call(doSmth(2), doSmth|) -> -{ doSmth(2) } : * COPY -try { return 1 } catch (e: UnsupportedOperationException) { doSmth(2) } : * NEW: merge(try { return 1 } catch (e: UnsupportedOperationException) { doSmth(2) }|!, ) -> -{ try { return 1 } catch (e: UnsupportedOperationException) { doSmth(2) } } : * COPY + : {<: UnsupportedOperationException /* = UnsupportedOperationException */} NEW: magic[FAKE_INITIALIZER](e: UnsupportedOperationException) -> +1 : Int NEW: r(1) -> +return 1 !: * +{ return 1 } !: * COPY +2 : Int NEW: r(2) -> +doSmth(2) : * NEW: call(doSmth(2), doSmth|) -> +{ doSmth(2) } : * COPY +try { return 1 } catch (e: UnsupportedOperationException) { doSmth(2) } : * NEW: merge(try { return 1 } catch (e: UnsupportedOperationException) { doSmth(2) }|!, ) -> +{ try { return 1 } catch (e: UnsupportedOperationException) { doSmth(2) } } : * COPY ===================== == t15 == fun t15() : Int { @@ -422,18 +422,18 @@ fun t15() : Int { } } --------------------- - : {<: UnsupportedOperationException} NEW: magic[FAKE_INITIALIZER](e: UnsupportedOperationException) -> -1 : Int NEW: r(1) -> -return 1 !: * -{ return 1 } !: * COPY -2 : Int NEW: r(2) -> -return 2 !: * -{ return 2 } !: * COPY -3 : Int NEW: r(3) -> -doSmth(3) : * NEW: call(doSmth(3), doSmth|) -> -{ doSmth(3) } : * COPY -try { return 1 } catch (e: UnsupportedOperationException) { return 2 } finally { doSmth(3) } : * NEW: merge(try { return 1 } catch (e: UnsupportedOperationException) { return 2 } finally { doSmth(3) }|!, !) -> -{ try { return 1 } catch (e: UnsupportedOperationException) { return 2 } finally { doSmth(3) } } : * COPY + : {<: UnsupportedOperationException /* = UnsupportedOperationException */} NEW: magic[FAKE_INITIALIZER](e: UnsupportedOperationException) -> +1 : Int NEW: r(1) -> +return 1 !: * +{ return 1 } !: * COPY +2 : Int NEW: r(2) -> +return 2 !: * +{ return 2 } !: * COPY +3 : Int NEW: r(3) -> +doSmth(3) : * NEW: call(doSmth(3), doSmth|) -> +{ doSmth(3) } : * COPY +try { return 1 } catch (e: UnsupportedOperationException) { return 2 } finally { doSmth(3) } : * NEW: merge(try { return 1 } catch (e: UnsupportedOperationException) { return 2 } finally { doSmth(3) }|!, !) -> +{ try { return 1 } catch (e: UnsupportedOperationException) { return 2 } finally { doSmth(3) } } : * COPY ===================== == t16 == fun t16() : Int { @@ -448,18 +448,18 @@ fun t16() : Int { } } --------------------- - : {<: UnsupportedOperationException} NEW: magic[FAKE_INITIALIZER](e: UnsupportedOperationException) -> -1 : Int NEW: r(1) -> -doSmth(1) : * NEW: call(doSmth(1), doSmth|) -> -{ doSmth(1) } : * COPY -2 : Int NEW: r(2) -> -return 2 !: * -{ return 2 } !: * COPY -3 : Int NEW: r(3) -> -doSmth(3) : * NEW: call(doSmth(3), doSmth|) -> -{ doSmth(3) } : * COPY -try { doSmth(1) } catch (e: UnsupportedOperationException) { return 2 } finally { doSmth(3) } : * NEW: merge(try { doSmth(1) } catch (e: UnsupportedOperationException) { return 2 } finally { doSmth(3) }|, !) -> -{ try { doSmth(1) } catch (e: UnsupportedOperationException) { return 2 } finally { doSmth(3) } } : * COPY + : {<: UnsupportedOperationException /* = UnsupportedOperationException */} NEW: magic[FAKE_INITIALIZER](e: UnsupportedOperationException) -> +1 : Int NEW: r(1) -> +doSmth(1) : * NEW: call(doSmth(1), doSmth|) -> +{ doSmth(1) } : * COPY +2 : Int NEW: r(2) -> +return 2 !: * +{ return 2 } !: * COPY +3 : Int NEW: r(3) -> +doSmth(3) : * NEW: call(doSmth(3), doSmth|) -> +{ doSmth(3) } : * COPY +try { doSmth(1) } catch (e: UnsupportedOperationException) { return 2 } finally { doSmth(3) } : * NEW: merge(try { doSmth(1) } catch (e: UnsupportedOperationException) { return 2 } finally { doSmth(3) }|, !) -> +{ try { doSmth(1) } catch (e: UnsupportedOperationException) { return 2 } finally { doSmth(3) } } : * COPY ===================== == doSmth == fun doSmth(i: Int) { diff --git a/compiler/testData/cfg/controlStructures/FinallyTestCopy.values b/compiler/testData/cfg/controlStructures/FinallyTestCopy.values index aa2bdae0ece..441d8ea4c18 100644 --- a/compiler/testData/cfg/controlStructures/FinallyTestCopy.values +++ b/compiler/testData/cfg/controlStructures/FinallyTestCopy.values @@ -30,19 +30,19 @@ fun testCopy1() : Int { } } --------------------- - : {<: NullPointerException} NEW: magic[FAKE_INITIALIZER](e: NullPointerException) -> - : {<: Exception} NEW: magic[FAKE_INITIALIZER](e: Exception) -> -doSmth() : * NEW: call(doSmth(), doSmth) -> -{ doSmth() } : * COPY -doSmth1() : * NEW: call(doSmth1(), doSmth1) -> -{ doSmth1() } : * COPY -doSmth2() : * NEW: call(doSmth2(), doSmth2) -> -{ doSmth2() } : * COPY -1 : Int NEW: r(1) -> -return 1 !: * -{ return 1 } !: * COPY -try { doSmth() } catch (e: NullPointerException) { doSmth1() } catch (e: Exception) { doSmth2() } finally { return 1 } : * NEW: merge(try { doSmth() } catch (e: NullPointerException) { doSmth1() } catch (e: Exception) { doSmth2() } finally { return 1 }|, , ) -> -{ try { doSmth() } catch (e: NullPointerException) { doSmth1() } catch (e: Exception) { doSmth2() } finally { return 1 } } : * COPY + : {<: NullPointerException /* = NullPointerException */} NEW: magic[FAKE_INITIALIZER](e: NullPointerException) -> + : {<: Exception /* = Exception */} NEW: magic[FAKE_INITIALIZER](e: Exception) -> +doSmth() : * NEW: call(doSmth(), doSmth) -> +{ doSmth() } : * COPY +doSmth1() : * NEW: call(doSmth1(), doSmth1) -> +{ doSmth1() } : * COPY +doSmth2() : * NEW: call(doSmth2(), doSmth2) -> +{ doSmth2() } : * COPY +1 : Int NEW: r(1) -> +return 1 !: * +{ return 1 } !: * COPY +try { doSmth() } catch (e: NullPointerException) { doSmth1() } catch (e: Exception) { doSmth2() } finally { return 1 } : * NEW: merge(try { doSmth() } catch (e: NullPointerException) { doSmth1() } catch (e: Exception) { doSmth2() } finally { return 1 }|, , ) -> +{ try { doSmth() } catch (e: NullPointerException) { doSmth1() } catch (e: Exception) { doSmth2() } finally { return 1 } } : * COPY ===================== == testCopy2 == fun testCopy2() { @@ -63,24 +63,24 @@ fun testCopy2() { } } --------------------- - : {<: NullPointerException} NEW: magic[FAKE_INITIALIZER](e: NullPointerException) -> - : {<: Exception} NEW: magic[FAKE_INITIALIZER](e: Exception) -> -cond() : Boolean NEW: call(cond(), cond) -> -doSmth() : * NEW: call(doSmth(), doSmth) -> -{ doSmth() } : * COPY -doSmth1() : * NEW: call(doSmth1(), doSmth1) -> -{ doSmth1() } : * COPY -doSmth2() : * NEW: call(doSmth2(), doSmth2) -> -{ doSmth2() } : * COPY -cond() : Boolean NEW: call(cond(), cond) -> -return !: * -continue !: * -if (cond()) return else continue : * NEW: merge(if (cond()) return else continue|!, !) -> -{ if (cond()) return else continue } : * COPY -try { doSmth() } catch (e: NullPointerException) { doSmth1() } catch (e: Exception) { doSmth2() } finally { if (cond()) return else continue } : * NEW: merge(try { doSmth() } catch (e: NullPointerException) { doSmth1() } catch (e: Exception) { doSmth2() } finally { if (cond()) return else continue }|, , ) -> -{ try { doSmth() } catch (e: NullPointerException) { doSmth1() } catch (e: Exception) { doSmth2() } finally { if (cond()) return else continue } } : * COPY -while (cond()) { try { doSmth() } catch (e: NullPointerException) { doSmth1() } catch (e: Exception) { doSmth2() } finally { if (cond()) return else continue } } !: * -{ while (cond()) { try { doSmth() } catch (e: NullPointerException) { doSmth1() } catch (e: Exception) { doSmth2() } finally { if (cond()) return else continue } } } !: * COPY + : {<: NullPointerException /* = NullPointerException */} NEW: magic[FAKE_INITIALIZER](e: NullPointerException) -> + : {<: Exception /* = Exception */} NEW: magic[FAKE_INITIALIZER](e: Exception) -> +cond() : Boolean NEW: call(cond(), cond) -> +doSmth() : * NEW: call(doSmth(), doSmth) -> +{ doSmth() } : * COPY +doSmth1() : * NEW: call(doSmth1(), doSmth1) -> +{ doSmth1() } : * COPY +doSmth2() : * NEW: call(doSmth2(), doSmth2) -> +{ doSmth2() } : * COPY +cond() : Boolean NEW: call(cond(), cond) -> +return !: * +continue !: * +if (cond()) return else continue : * NEW: merge(if (cond()) return else continue|!, !) -> +{ if (cond()) return else continue } : * COPY +try { doSmth() } catch (e: NullPointerException) { doSmth1() } catch (e: Exception) { doSmth2() } finally { if (cond()) return else continue } : * NEW: merge(try { doSmth() } catch (e: NullPointerException) { doSmth1() } catch (e: Exception) { doSmth2() } finally { if (cond()) return else continue }|, , ) -> +{ try { doSmth() } catch (e: NullPointerException) { doSmth1() } catch (e: Exception) { doSmth2() } finally { if (cond()) return else continue } } : * COPY +while (cond()) { try { doSmth() } catch (e: NullPointerException) { doSmth1() } catch (e: Exception) { doSmth2() } finally { if (cond()) return else continue } } !: * +{ while (cond()) { try { doSmth() } catch (e: NullPointerException) { doSmth1() } catch (e: Exception) { doSmth2() } finally { if (cond()) return else continue } } } !: * COPY ===================== == testCopy3 == fun testCopy3() { @@ -98,19 +98,19 @@ fun testCopy3() { } } --------------------- - : {<: NullPointerException} NEW: magic[FAKE_INITIALIZER](e: NullPointerException) -> - : {<: Exception} NEW: magic[FAKE_INITIALIZER](e: Exception) -> -doSmth() : * NEW: call(doSmth(), doSmth) -> -{ doSmth() } : * COPY -doSmth1() : * NEW: call(doSmth1(), doSmth1) -> -{ doSmth1() } : * COPY -doSmth2() : * NEW: call(doSmth2(), doSmth2) -> -{ doSmth2() } : * COPY -cond() : Boolean NEW: call(cond(), cond) -> -while (cond()) !: * -{ while (cond()); } !: * COPY -try { doSmth() } catch (e: NullPointerException) { doSmth1() } catch (e: Exception) { doSmth2() } finally { while (cond()); } : * NEW: merge(try { doSmth() } catch (e: NullPointerException) { doSmth1() } catch (e: Exception) { doSmth2() } finally { while (cond()); }|, , ) -> -{ try { doSmth() } catch (e: NullPointerException) { doSmth1() } catch (e: Exception) { doSmth2() } finally { while (cond()); } } : * COPY + : {<: NullPointerException /* = NullPointerException */} NEW: magic[FAKE_INITIALIZER](e: NullPointerException) -> + : {<: Exception /* = Exception */} NEW: magic[FAKE_INITIALIZER](e: Exception) -> +doSmth() : * NEW: call(doSmth(), doSmth) -> +{ doSmth() } : * COPY +doSmth1() : * NEW: call(doSmth1(), doSmth1) -> +{ doSmth1() } : * COPY +doSmth2() : * NEW: call(doSmth2(), doSmth2) -> +{ doSmth2() } : * COPY +cond() : Boolean NEW: call(cond(), cond) -> +while (cond()) !: * +{ while (cond()); } !: * COPY +try { doSmth() } catch (e: NullPointerException) { doSmth1() } catch (e: Exception) { doSmth2() } finally { while (cond()); } : * NEW: merge(try { doSmth() } catch (e: NullPointerException) { doSmth1() } catch (e: Exception) { doSmth2() } finally { while (cond()); }|, , ) -> +{ try { doSmth() } catch (e: NullPointerException) { doSmth1() } catch (e: Exception) { doSmth2() } finally { while (cond()); } } : * COPY ===================== == doTestCopy4 == fun doTestCopy4(list: List?) : Int { diff --git a/compiler/testData/cfg/tailCalls/tryCatchFinally.values b/compiler/testData/cfg/tailCalls/tryCatchFinally.values index d78d503a37a..8561ab39856 100644 --- a/compiler/testData/cfg/tailCalls/tryCatchFinally.values +++ b/compiler/testData/cfg/tailCalls/tryCatchFinally.values @@ -9,13 +9,13 @@ fun test() : Unit { } } --------------------- - : {<: Exception} NEW: magic[FAKE_INITIALIZER](any : Exception) -> -test() : * NEW: call(test(), test) -> -{ test() } : * COPY -test() : * NEW: call(test(), test) -> -{ test() } : * COPY -test() : * NEW: call(test(), test) -> -{ test() } : * COPY -try { test() } catch (any : Exception) { test() } finally { test() } : * NEW: merge(try { test() } catch (any : Exception) { test() } finally { test() }|, ) -> -{ try { test() } catch (any : Exception) { test() } finally { test() } } : * COPY + : {<: Exception /* = Exception */} NEW: magic[FAKE_INITIALIZER](any : Exception) -> +test() : * NEW: call(test(), test) -> +{ test() } : * COPY +test() : * NEW: call(test(), test) -> +{ test() } : * COPY +test() : * NEW: call(test(), test) -> +{ test() } : * COPY +try { test() } catch (any : Exception) { test() } finally { test() } : * NEW: merge(try { test() } catch (any : Exception) { test() } finally { test() }|, ) -> +{ try { test() } catch (any : Exception) { test() } finally { test() } } : * COPY =====================