From 28da325a113ef1320d52ad85994dd57f44518b91 Mon Sep 17 00:00:00 2001 From: "victor.petukhov" Date: Mon, 19 Aug 2019 12:00:13 +0300 Subject: [PATCH] Actualize DFA spec tests --- .../diagnostics/notLinked/dfa/neg/1.kt | 4 +- .../diagnostics/notLinked/dfa/neg/22.kt | 4 +- .../diagnostics/notLinked/dfa/neg/30.kt | 10 +- .../diagnostics/notLinked/dfa/neg/32.kt | 8 +- .../diagnostics/notLinked/dfa/neg/40.kt | 6 +- .../diagnostics/notLinked/dfa/neg/43.kt | 2 +- .../diagnostics/notLinked/dfa/neg/45.kt | 2 +- .../diagnostics/notLinked/dfa/pos/1.kt | 16 ++ .../diagnostics/notLinked/dfa/pos/11.kt | 54 ++-- .../diagnostics/notLinked/dfa/pos/12.kt | 214 +++++++------- .../diagnostics/notLinked/dfa/pos/13.kt | 220 +++++++-------- .../diagnostics/notLinked/dfa/pos/14.kt | 4 +- .../diagnostics/notLinked/dfa/pos/15.kt | 72 +++-- .../diagnostics/notLinked/dfa/pos/25.kt | 1 + .../diagnostics/notLinked/dfa/pos/26.kt | 1 + .../diagnostics/notLinked/dfa/pos/27.kt | 1 + .../diagnostics/notLinked/dfa/pos/3.kt | 6 +- .../diagnostics/notLinked/dfa/pos/32.kt | 2 +- .../diagnostics/notLinked/dfa/pos/4.kt | 6 +- .../diagnostics/notLinked/dfa/pos/40.kt | 9 +- .../diagnostics/notLinked/dfa/pos/41.kt | 2 +- .../diagnostics/notLinked/dfa/pos/5.kt | 4 +- .../diagnostics/notLinked/dfa/pos/50.kt | 12 +- .../diagnostics/notLinked/dfa/pos/51.kt | 15 +- .../diagnostics/notLinked/dfa/pos/55.kt | 4 +- .../diagnostics/notLinked/dfa/pos/57.kt | 26 +- .../diagnostics/notLinked/dfa/pos/6.kt | 18 +- .../diagnostics/notLinked/dfa/pos/64.kt | 4 +- .../diagnostics/notLinked/dfa/pos/72.kt | 2 +- .../diagnostics/notLinked/dfa/pos/9.kt | 264 +++++++++--------- 30 files changed, 520 insertions(+), 473 deletions(-) diff --git a/compiler/tests-spec/testData/diagnostics/notLinked/dfa/neg/1.kt b/compiler/tests-spec/testData/diagnostics/notLinked/dfa/neg/1.kt index dcbe4462eee..fdbad6d3278 100644 --- a/compiler/tests-spec/testData/diagnostics/notLinked/dfa/neg/1.kt +++ b/compiler/tests-spec/testData/diagnostics/notLinked/dfa/neg/1.kt @@ -265,14 +265,14 @@ fun case_16() { if (x != null !is Boolean !is Boolean !is Boolean !is Boolean !is Boolean) { x - x.java + x.java } } // TESTCASE NUMBER: 17 val case_17 = if (nullableIntProperty == null == true == false) 0 else { nullableIntProperty - nullableIntProperty.java + nullableIntProperty.java } //TESTCASE NUMBER: 18 diff --git a/compiler/tests-spec/testData/diagnostics/notLinked/dfa/neg/22.kt b/compiler/tests-spec/testData/diagnostics/notLinked/dfa/neg/22.kt index 8ba4aa6e9cf..9380c05fd39 100644 --- a/compiler/tests-spec/testData/diagnostics/notLinked/dfa/neg/22.kt +++ b/compiler/tests-spec/testData/diagnostics/notLinked/dfa/neg/22.kt @@ -74,7 +74,7 @@ fun case_4(x: Boolean?, y: Boolean?) { // TESTCASE NUMBER: 5 fun case_5(x: Boolean?, y: Boolean?) { while (true) { - y.to(break) + y.to(break) x!! } @@ -176,7 +176,7 @@ fun case_12(x: Int?) { val y: Int while (true) { - break[x!!] + break[x!!] } x diff --git a/compiler/tests-spec/testData/diagnostics/notLinked/dfa/neg/30.kt b/compiler/tests-spec/testData/diagnostics/notLinked/dfa/neg/30.kt index e6af9badd71..8fc9a1f31a5 100644 --- a/compiler/tests-spec/testData/diagnostics/notLinked/dfa/neg/30.kt +++ b/compiler/tests-spec/testData/diagnostics/notLinked/dfa/neg/30.kt @@ -15,28 +15,28 @@ // TESTCASE NUMBER: 1 class Case1(val x: Any?) { val y = x!! - val z: Any = x + val z: Any = x } // TESTCASE NUMBER: 2 class Case2(val y: Any?): ClassWithCostructorParam(y!!) { - val z: Any = y + val z: Any = y } // TESTCASE NUMBER: 3 class Case3(val y: Any?): ClassWithCostructorParam(y as Class) { - val z: Class = y + val z: Class = y } // TESTCASE NUMBER: 4 class Case4(val y: Any?): ClassWithCostructorParam(y!!) { init { - val z: Any = y + val z: Any = y } } // TESTCASE NUMBER: 5 -class Case5(val y: Any?): ClassWithCostructorParam(y as Interface1), Interface1 by y {} +class Case5(val y: Any?): ClassWithCostructorParam(y as Interface1), Interface1 by y {} // TESTCASE NUMBER: 6 fun case_6(a: Int?) = object : ClassWithCostructorParam(a!!) { diff --git a/compiler/tests-spec/testData/diagnostics/notLinked/dfa/neg/32.kt b/compiler/tests-spec/testData/diagnostics/notLinked/dfa/neg/32.kt index c17b97b8b40..0acc3cf23e4 100644 --- a/compiler/tests-spec/testData/diagnostics/notLinked/dfa/neg/32.kt +++ b/compiler/tests-spec/testData/diagnostics/notLinked/dfa/neg/32.kt @@ -46,8 +46,8 @@ fun case_2(x: Int?, y: Nothing?) { fun case_3(x: Int?) { if (x == null) { x as Int - stringArg(x) - x + stringArg(x) + x } } @@ -59,7 +59,7 @@ fun case_3(x: Int?) { fun case_4(x: Int?) { if (x == null) { x!! - stringArg(x) + stringArg(x) x } } @@ -73,7 +73,7 @@ fun case_5(x: Int?) { if (x == null) { var y = x y!! - stringArg(y) + stringArg(y) y } } diff --git a/compiler/tests-spec/testData/diagnostics/notLinked/dfa/neg/40.kt b/compiler/tests-spec/testData/diagnostics/notLinked/dfa/neg/40.kt index 343ca2a464a..2418b50f237 100644 --- a/compiler/tests-spec/testData/diagnostics/notLinked/dfa/neg/40.kt +++ b/compiler/tests-spec/testData/diagnostics/notLinked/dfa/neg/40.kt @@ -18,7 +18,7 @@ fun case_1(x: Pair<*, *>) { if (x.first !is String) return x.first - x.first.length + x.first.length } /* @@ -28,5 +28,5 @@ fun case_1(x: Pair<*, *>) { fun case_2(x: Pair<*, *>) { if (x.first !is String?) throw Exception() x.first - x.first?.length -} + x.first?.length +} \ No newline at end of file diff --git a/compiler/tests-spec/testData/diagnostics/notLinked/dfa/neg/43.kt b/compiler/tests-spec/testData/diagnostics/notLinked/dfa/neg/43.kt index c828ce9f5a4..d27d635747f 100644 --- a/compiler/tests-spec/testData/diagnostics/notLinked/dfa/neg/43.kt +++ b/compiler/tests-spec/testData/diagnostics/notLinked/dfa/neg/43.kt @@ -23,7 +23,7 @@ fun case_1(x: Double?, y: Double?) : Double { } else if (x == null && y != null) { y } else { - x + y + x + y } } diff --git a/compiler/tests-spec/testData/diagnostics/notLinked/dfa/neg/45.kt b/compiler/tests-spec/testData/diagnostics/notLinked/dfa/neg/45.kt index 11384270907..cd52f671e5c 100644 --- a/compiler/tests-spec/testData/diagnostics/notLinked/dfa/neg/45.kt +++ b/compiler/tests-spec/testData/diagnostics/notLinked/dfa/neg/45.kt @@ -26,5 +26,5 @@ fun case_1(x: Number?): Long? { * ISSUES: KT-22997 */ fun case_2(x: Number?): Long? { - if (x == null || x is Long) return x else return 0L + if (x == null || x is Long) return x else return 0L } \ No newline at end of file diff --git a/compiler/tests-spec/testData/diagnostics/notLinked/dfa/pos/1.kt b/compiler/tests-spec/testData/diagnostics/notLinked/dfa/pos/1.kt index 9839fd0df46..e6ccb7a8f21 100644 --- a/compiler/tests-spec/testData/diagnostics/notLinked/dfa/pos/1.kt +++ b/compiler/tests-spec/testData/diagnostics/notLinked/dfa/pos/1.kt @@ -1304,9 +1304,13 @@ open class Case29(a: Int?, val b: Float?, private val c: Unit?, protected val d: s = null s.hashCode() s + if (s != null) s.java if (s != null) s + if (this.s != null) s.java if (this.s != null) s + if (s != null || this.s != null) s.java if (s != null || this.s != null) s + if (s != null || this.s != null) this.s.java if (s != null || this.s != null) this.s } @@ -2348,9 +2352,13 @@ sealed class Case30(a: Int?, val b: Float?, private val c: Unit?, protected val s = null s.hashCode() s + if (s != null) s.java if (s != null) s + if (this.s != null) s.java if (this.s != null) s + if (s != null || this.s != null) s.java if (s != null || this.s != null) s + if (s != null || this.s != null) this.s.java if (s != null || this.s != null) this.s } @@ -3393,9 +3401,13 @@ enum class Case31(a: Int?, val b: Float?, private val c: Unit?, protected val d: s = null s.hashCode() s + if (s != null) s.java if (s != null) s + if (this.s != null) s.java if (this.s != null) s + if (s != null || this.s != null) s.java if (s != null || this.s != null) s + if (s != null || this.s != null) this.s.java if (s != null || this.s != null) this.s } @@ -4041,9 +4053,13 @@ object Case32 { s = null s.hashCode() s + if (s != null) s.java if (s != null) s + if (this.s != null) s.java if (this.s != null) s + if (s != null || this.s != null) s.java if (s != null || this.s != null) s + if (s != null || this.s != null) this.s.java if (s != null || this.s != null) this.s } diff --git a/compiler/tests-spec/testData/diagnostics/notLinked/dfa/pos/11.kt b/compiler/tests-spec/testData/diagnostics/notLinked/dfa/pos/11.kt index a55a2db28b4..b62a316d9fe 100644 --- a/compiler/tests-spec/testData/diagnostics/notLinked/dfa/pos/11.kt +++ b/compiler/tests-spec/testData/diagnostics/notLinked/dfa/pos/11.kt @@ -63,16 +63,16 @@ fun case_3(a: Int?, b: Float?, c: Double?, d: Boolean?) { }.apply { ? & Number?}"), DEBUG_INFO_EXPRESSION_TYPE("{Comparable<{Double & Float & Int}>? & Number?}")!>this if (this != null) { - & Number} & {Comparable<{Double & Float & Int}>? & Number?}"), DEBUG_INFO_EXPRESSION_TYPE("{Comparable<{Double & Float & Int}>? & Number?}")!>this + ? & Number?}"), DEBUG_INFO_EXPRESSION_TYPE("{Comparable<{Double & Float & Int}>? & Number?}")!>this & Number}"), DEBUG_INFO_EXPRESSION_TYPE("{Comparable<{Double & Float & Int}>? & Number?}"), DEBUG_INFO_SMARTCAST!>this.equals(null) & Number}"), DEBUG_INFO_EXPRESSION_TYPE("{Comparable<{Double & Float & Int}>? & Number?}"), DEBUG_INFO_SMARTCAST!>this.propT & Number}"), DEBUG_INFO_EXPRESSION_TYPE("{Comparable<{Double & Float & Int}>? & Number?}"), DEBUG_INFO_SMARTCAST!>this.propAny - & Number} & {Comparable<{Double & Float & Int}>? & Number?}"), DEBUG_INFO_EXPRESSION_TYPE("{Comparable<{Double & Float & Int}>? & Number?}")!>this.propNullableT - & Number} & {Comparable<{Double & Float & Int}>? & Number?}"), DEBUG_INFO_EXPRESSION_TYPE("{Comparable<{Double & Float & Int}>? & Number?}")!>this.propNullableAny + ? & Number?}"), DEBUG_INFO_EXPRESSION_TYPE("{Comparable<{Double & Float & Int}>? & Number?}")!>this.propNullableT + ? & Number?}"), DEBUG_INFO_EXPRESSION_TYPE("{Comparable<{Double & Float & Int}>? & Number?}")!>this.propNullableAny & Number}"), DEBUG_INFO_EXPRESSION_TYPE("{Comparable<{Double & Float & Int}>? & Number?}"), DEBUG_INFO_SMARTCAST!>this.funT() & Number}"), DEBUG_INFO_EXPRESSION_TYPE("{Comparable<{Double & Float & Int}>? & Number?}"), DEBUG_INFO_SMARTCAST!>this.funAny() - & Number} & {Comparable<{Double & Float & Int}>? & Number?}"), DEBUG_INFO_EXPRESSION_TYPE("{Comparable<{Double & Float & Int}>? & Number?}")!>this.funNullableT() - & Number} & {Comparable<{Double & Float & Int}>? & Number?}"), DEBUG_INFO_EXPRESSION_TYPE("{Comparable<{Double & Float & Int}>? & Number?}")!>this.funNullableAny() + ? & Number?}"), DEBUG_INFO_EXPRESSION_TYPE("{Comparable<{Double & Float & Int}>? & Number?}")!>this.funNullableT() + ? & Number?}"), DEBUG_INFO_EXPRESSION_TYPE("{Comparable<{Double & Float & Int}>? & Number?}")!>this.funNullableAny() } }.let { ? & Number?}")!>it @@ -106,16 +106,16 @@ fun case_4(a: Interface1?, b: Interface2?, c: Boolean) { x.apply { this if (this != null) { - this + this this.equals(null) this.propT this.propAny - this.propNullableT - this.propNullableAny + this.propNullableT + this.propNullableAny this.funT() this.funAny() - this.funNullableT() - this.funNullableAny() + this.funNullableT() + this.funNullableAny() } } x.let { @@ -149,16 +149,16 @@ fun case_5(a: Interface1?, b: Interface2?, d: Boolean) { x.apply { if (this != null) { - this + this this.equals(null) this.propT this.propAny - this.propNullableT - this.propNullableAny + this.propNullableT + this.propNullableAny this.funT() this.funAny() - this.funNullableT() - this.funNullableAny() + this.funNullableT() + this.funNullableAny() } } x.let { @@ -191,18 +191,18 @@ fun case_6(a: Interface1?, b: Interface2, d: Boolean) { x.apply { this as Interface3 - this + this if (this != null) { - this + this this.equals(null) this.propT this.propAny - this.propNullableT - this.propNullableAny + this.propNullableT + this.propNullableAny this.funT() this.funAny() - this.funNullableT() - this.funNullableAny() + this.funNullableT() + this.funNullableAny() this.itest1() this.itest2() } @@ -241,18 +241,18 @@ fun case_7(a: Interface1?, b: Interface2?, d: Boolean) { x.apply { this as Interface3? - this + this if (this != null) { - this + this this.equals(null) this.propT this.propAny - this.propNullableT - this.propNullableAny + this.propNullableT + this.propNullableAny this.funT() this.funAny() - this.funNullableT() - this.funNullableAny() + this.funNullableT() + this.funNullableAny() this.itest1() this.itest2() } diff --git a/compiler/tests-spec/testData/diagnostics/notLinked/dfa/pos/12.kt b/compiler/tests-spec/testData/diagnostics/notLinked/dfa/pos/12.kt index fc0372f357b..6a0febc9e6c 100644 --- a/compiler/tests-spec/testData/diagnostics/notLinked/dfa/pos/12.kt +++ b/compiler/tests-spec/testData/diagnostics/notLinked/dfa/pos/12.kt @@ -667,10 +667,10 @@ fun ?> T.case_14() { this.funAny() this.funNullableT() this.funNullableAny() - this.get() + this.get() equals(this) - get() + get() apply { this equals(null) @@ -682,7 +682,7 @@ fun ?> T.case_14() { funAny() funNullableT() funNullableAny() - get() + get() this.equals(null) this.propT this.propAny @@ -692,11 +692,11 @@ fun ?> T.case_14() { this.funAny() this.funNullableT() this.funNullableAny() - this.get() + this.get() } also { it - it.get() + it.get() it.equals(null) it.propT it.propAny @@ -727,10 +727,10 @@ fun ?> T.case_15() { this.funAny() this.funNullableT() this.funNullableAny() - this.itest1() + this.itest1() equals(this) - itest1() + itest1() apply { this equals(null) @@ -742,7 +742,7 @@ fun ?> T.case_15() { funAny() funNullableT() funNullableAny() - itest1() + itest1() this.equals(null) this.propT this.propAny @@ -752,11 +752,11 @@ fun ?> T.case_15() { this.funAny() this.funNullableT() this.funNullableAny() - this.itest1() + this.itest1() } also { it - it.itest1() + it.itest1() it.equals(null) it.propT it.propAny @@ -787,10 +787,10 @@ fun ?> T.case_16() { this.funAny() this.funNullableT() this.funNullableAny() - this.ip1test1() + this.ip1test1() equals(this) - ip1test1() + ip1test1() apply { this equals(null) @@ -802,7 +802,7 @@ fun ?> T.case_16() { funAny() funNullableT() funNullableAny() - ip1test1() + ip1test1() this.equals(null) this.propT this.propAny @@ -812,11 +812,11 @@ fun ?> T.case_16() { this.funAny() this.funNullableT() this.funNullableAny() - this.ip1test1() + this.ip1test1() } also { it - it.ip1test1() + it.ip1test1() it.equals(null) it.propT it.propAny @@ -847,10 +847,10 @@ fun ?> T.case_17() { this.funAny() this.funNullableT() this.funNullableAny() - this.ip1test1() + this.ip1test1() equals(this) - ip1test1() + ip1test1() apply { this equals(null) @@ -862,7 +862,7 @@ fun ?> T.case_17() { funAny() funNullableT() funNullableAny() - ip1test1() + ip1test1() this.equals(null) this.propT this.propAny @@ -872,11 +872,11 @@ fun ?> T.case_17() { this.funAny() this.funNullableT() this.funNullableAny() - this.ip1test1() + this.ip1test1() } also { it - it.ip1test1() + it.ip1test1() it.equals(null) it.propT it.propAny @@ -909,7 +909,7 @@ fun ?> T.case_18() { y.funAny() y.funNullableT() y.funNullableAny() - y.ip1test1() + y.ip1test1() equals(y) ip1test1() @@ -961,10 +961,10 @@ fun ?> T.case_19() { this.funAny() this.funNullableT() this.funNullableAny() - this.ip1test1() + this.ip1test1() equals(this) - ip1test1() + ip1test1() apply { this equals(null) @@ -976,7 +976,7 @@ fun ?> T.case_19() { funAny() funNullableT() funNullableAny() - ip1test1() + ip1test1() this.equals(null) this.propT this.propAny @@ -986,11 +986,11 @@ fun ?> T.case_19() { this.funAny() this.funNullableT() this.funNullableAny() - this.ip1test1() + this.ip1test1() } also { it - it.ip1test1() + it.ip1test1() it.equals(null) it.propT it.propAny @@ -1021,12 +1021,12 @@ fun T.case_20() where T: InterfaceWithTypeParameter1?, T: InterfaceWit this.funAny() this.funNullableT() this.funNullableAny() - this.ip1test1() - this.ip1test2() + this.ip1test1() + this.ip1test2() equals(this) - ip1test1() - ip1test2() + ip1test1() + ip1test2() apply { this equals(null) @@ -1038,8 +1038,8 @@ fun T.case_20() where T: InterfaceWithTypeParameter1?, T: InterfaceWit funAny() funNullableT() funNullableAny() - ip1test1() - ip1test2() + ip1test1() + ip1test2() this.equals(null) this.propT this.propAny @@ -1049,8 +1049,8 @@ fun T.case_20() where T: InterfaceWithTypeParameter1?, T: InterfaceWit this.funAny() this.funNullableT() this.funNullableAny() - this.ip1test1() - this.ip1test2() + this.ip1test1() + this.ip1test2() } also { it @@ -1063,8 +1063,8 @@ fun T.case_20() where T: InterfaceWithTypeParameter1?, T: InterfaceWit it.funAny() it.funNullableT() it.funNullableAny() - it.ip1test1() - it.ip1test2() + it.ip1test1() + it.ip1test2() } } } @@ -1086,13 +1086,13 @@ fun T.case_21() where T: InterfaceWithTypeParameter1?, T: InterfaceWit this.funAny() this.funNullableT() this.funNullableAny() - this.ip1test1() - this.ip1test2() + this.ip1test1() + this.ip1test2() this.ip1test3() equals(this) - ip1test1() - ip1test2() + ip1test1() + ip1test2() ip1test3() apply { this @@ -1105,8 +1105,8 @@ fun T.case_21() where T: InterfaceWithTypeParameter1?, T: InterfaceWit funAny() funNullableT() funNullableAny() - ip1test1() - ip1test2() + ip1test1() + ip1test2() ip1test3() this.equals(null) this.propT @@ -1117,8 +1117,8 @@ fun T.case_21() where T: InterfaceWithTypeParameter1?, T: InterfaceWit this.funAny() this.funNullableT() this.funNullableAny() - this.ip1test1() - this.ip1test2() + this.ip1test1() + this.ip1test2() this.ip1test3() } also { @@ -1132,8 +1132,8 @@ fun T.case_21() where T: InterfaceWithTypeParameter1?, T: InterfaceWit it.funAny() it.funNullableT() it.funNullableAny() - it.ip1test1() - it.ip1test2() + it.ip1test1() + it.ip1test2() it.ip1test3() } } @@ -2864,11 +2864,11 @@ fun T?.case_47() where T : Inv, T: Comparable<*>?, T: InterfaceWithTypePa this.funNullableT() this.funNullableAny() this.get() - this.ip1test1() + this.ip1test1() equals(this) get() - ip1test1() + ip1test1() apply { this equals(null) @@ -2881,7 +2881,7 @@ fun T?.case_47() where T : Inv, T: Comparable<*>?, T: InterfaceWithTypePa funNullableT() funNullableAny() get() - ip1test1() + ip1test1() this.equals(null) this.propT this.propAny @@ -2892,7 +2892,7 @@ fun T?.case_47() where T : Inv, T: Comparable<*>?, T: InterfaceWithTypePa this.funNullableT() this.funNullableAny() this.get() - this.ip1test1() + this.ip1test1() } also { it @@ -2906,19 +2906,19 @@ fun T?.case_47() where T : Inv, T: Comparable<*>?, T: InterfaceWithTypePa it.funNullableT() it.funNullableAny() it.get() - it.ip1test1() + it.ip1test1() } - this.compareTo(return) - compareTo(return) + this.compareTo(return) + compareTo(return) apply { - compareTo(return) - this.compareTo(return) + compareTo(return) + this.compareTo(return) } also { - it.compareTo(return) + it.compareTo(return) } } } @@ -2941,11 +2941,11 @@ fun T?.case_48() where T : Inv, T: InterfaceWithTypeParameter1? this.funNullableT() this.funNullableAny() this.get() - this.ip1test1() + this.ip1test1() equals(this) get() - ip1test1() + ip1test1() apply { this equals(null) @@ -2958,7 +2958,7 @@ fun T?.case_48() where T : Inv, T: InterfaceWithTypeParameter1? funNullableT() funNullableAny() get() - ip1test1() + ip1test1() this.equals(null) this.propT this.propAny @@ -2969,7 +2969,7 @@ fun T?.case_48() where T : Inv, T: InterfaceWithTypeParameter1? this.funNullableT() this.funNullableAny() this.get() - this.ip1test1() + this.ip1test1() } also { it @@ -2983,7 +2983,7 @@ fun T?.case_48() where T : Inv, T: InterfaceWithTypeParameter1? it.funNullableT() it.funNullableAny() it.get() - it.ip1test1() + it.ip1test1() } } } @@ -3006,11 +3006,11 @@ fun T?.case_49() where T : Inv, T: InterfaceWithTypeParameter1? this.funNullableT() this.funNullableAny() this.get() - this.ip1test1() + this.ip1test1() equals(this) get() - ip1test1() + ip1test1() apply { this equals(null) @@ -3023,7 +3023,7 @@ fun T?.case_49() where T : Inv, T: InterfaceWithTypeParameter1? funNullableT() funNullableAny() get() - ip1test1() + ip1test1() this.equals(null) this.propT this.propAny @@ -3034,7 +3034,7 @@ fun T?.case_49() where T : Inv, T: InterfaceWithTypeParameter1? this.funNullableT() this.funNullableAny() this.get() - this.ip1test1() + this.ip1test1() } also { it @@ -3048,7 +3048,7 @@ fun T?.case_49() where T : Inv, T: InterfaceWithTypeParameter1? it.funNullableT() it.funNullableAny() it.get() - it.ip1test1() + it.ip1test1() } } } @@ -3071,11 +3071,11 @@ fun T?.case_50() where T : Inv, T: InterfaceWithTypeParameter1 this.funNullableT() this.funNullableAny() this.get() - this.ip1test1() + this.ip1test1() equals(this) get() - ip1test1() + ip1test1() apply { this equals(null) @@ -3088,7 +3088,7 @@ fun T?.case_50() where T : Inv, T: InterfaceWithTypeParameter1 funNullableT() funNullableAny() get() - ip1test1() + ip1test1() this.equals(null) this.propT this.propAny @@ -3099,7 +3099,7 @@ fun T?.case_50() where T : Inv, T: InterfaceWithTypeParameter1 this.funNullableT() this.funNullableAny() this.get() - this.ip1test1() + this.ip1test1() } also { it @@ -3113,7 +3113,7 @@ fun T?.case_50() where T : Inv, T: InterfaceWithTypeParameter1 it.funNullableT() it.funNullableAny() it.get() - it.ip1test1() + it.ip1test1() } } } @@ -3136,11 +3136,11 @@ fun T?.case_51() where T : Inv, T: InterfaceWithTypeParameter1? { this.funNullableT() this.funNullableAny() this.get() - this.ip1test1() + this.ip1test1() equals(this) get() - ip1test1() + ip1test1() apply { this equals(null) @@ -3153,7 +3153,7 @@ fun T?.case_51() where T : Inv, T: InterfaceWithTypeParameter1? { funNullableT() funNullableAny() get() - ip1test1() + ip1test1() this.equals(null) this.propT this.propAny @@ -3164,7 +3164,7 @@ fun T?.case_51() where T : Inv, T: InterfaceWithTypeParameter1? { this.funNullableT() this.funNullableAny() this.get() - this.ip1test1() + this.ip1test1() } also { it @@ -3178,7 +3178,7 @@ fun T?.case_51() where T : Inv, T: InterfaceWithTypeParameter1? { it.funNullableT() it.funNullableAny() it.get() - it.ip1test1() + it.ip1test1() } } } @@ -3262,11 +3262,11 @@ fun T?.case_53() where T : Inv, T: InterfaceWithTypeParameter1<*>? { this.funNullableT() this.funNullableAny() this.get() - this.ip1test1() + this.ip1test1() equals(this) get() - ip1test1() + ip1test1() apply { this equals(null) @@ -3279,7 +3279,7 @@ fun T?.case_53() where T : Inv, T: InterfaceWithTypeParameter1<*>? { funNullableT() funNullableAny() get() - ip1test1() + ip1test1() this.equals(null) this.propT this.propAny @@ -3290,7 +3290,7 @@ fun T?.case_53() where T : Inv, T: InterfaceWithTypeParameter1<*>? { this.funNullableT() this.funNullableAny() this.get() - this.ip1test1() + this.ip1test1() } also { it @@ -3304,7 +3304,7 @@ fun T?.case_53() where T : Inv, T: InterfaceWithTypeParameter1<*>? { it.funNullableT() it.funNullableAny() it.get() - it.ip1test1() + it.ip1test1() } } } @@ -3327,11 +3327,11 @@ fun T?.case_54() where T : Inv<*>, T: InterfaceWithTypeParameter1? { this.funNullableT() this.funNullableAny() this.get() - this.ip1test1() + this.ip1test1() equals(this) get() - ip1test1() + ip1test1() apply { this equals(null) @@ -3344,7 +3344,7 @@ fun T?.case_54() where T : Inv<*>, T: InterfaceWithTypeParameter1? { funNullableT() funNullableAny() get() - ip1test1() + ip1test1() this.equals(null) this.propT this.propAny @@ -3355,7 +3355,7 @@ fun T?.case_54() where T : Inv<*>, T: InterfaceWithTypeParameter1? { this.funNullableT() this.funNullableAny() this.get() - this.ip1test1() + this.ip1test1() } also { it @@ -3369,7 +3369,7 @@ fun T?.case_54() where T : Inv<*>, T: InterfaceWithTypeParameter1? { it.funNullableT() it.funNullableAny() it.get() - it.ip1test1() + it.ip1test1() } } } @@ -3650,14 +3650,14 @@ fun T.case_59() where T: InterfaceWithFiveTypeParameters1this.funAny() this.funNullableT() this.funNullableAny() - this.itest1() - this.itest2() - this.itest3() + this.itest1() + this.itest2() + this.itest3() equals(this) - itest1() - itest2() - itest3() + itest1() + itest2() + itest3() apply { this equals(null) @@ -3669,9 +3669,9 @@ fun T.case_59() where T: InterfaceWithFiveTypeParameters1itest1() + itest2() + itest3() this.equals(null) this.propT this.propAny @@ -3681,9 +3681,9 @@ fun T.case_59() where T: InterfaceWithFiveTypeParameters1this.funAny() this.funNullableT() this.funNullableAny() - this.itest1() - this.itest2() - this.itest3() + this.itest1() + this.itest2() + this.itest3() } also { it @@ -3696,9 +3696,9 @@ fun T.case_59() where T: InterfaceWithFiveTypeParameters1it.funAny() it.funNullableT() it.funNullableAny() - it.itest1() - it.itest2() - it.itest3() + it.itest1() + it.itest2() + it.itest3() } } } @@ -3720,10 +3720,10 @@ fun ?> T.case_60() { this.funAny() this.funNullableT() this.funNullableAny() - this.ip1test1() + this.ip1test1() equals(this) - ip1test1() + ip1test1() apply { this equals(null) @@ -3735,7 +3735,7 @@ fun ?> T.case_60() { funAny() funNullableT() funNullableAny() - ip1test1() + ip1test1() this.equals(null) this.propT this.propAny @@ -3745,7 +3745,7 @@ fun ?> T.case_60() { this.funAny() this.funNullableT() this.funNullableAny() - this.ip1test1() + this.ip1test1() } also { it @@ -3758,7 +3758,7 @@ fun ?> T.case_60() { it.funAny() it.funNullableT() it.funNullableAny() - it.ip1test1() + it.ip1test1() } } } @@ -3839,7 +3839,7 @@ fun Nothing.case_63() { also { it it.hashCode() - } + } } } diff --git a/compiler/tests-spec/testData/diagnostics/notLinked/dfa/pos/13.kt b/compiler/tests-spec/testData/diagnostics/notLinked/dfa/pos/13.kt index ef32d7090b1..184a170fe40 100644 --- a/compiler/tests-spec/testData/diagnostics/notLinked/dfa/pos/13.kt +++ b/compiler/tests-spec/testData/diagnostics/notLinked/dfa/pos/13.kt @@ -783,7 +783,7 @@ fun ?> case_14(x: T) { x.funAny() x.funNullableT() x.funNullableAny() - x.get() + x.get() x.equals(null) @@ -802,7 +802,7 @@ fun ?> case_14(x: T) { x.funNullableT() x.funNullableAny() - x.get() + x.get() x.apply { this equals(null) @@ -814,7 +814,7 @@ fun ?> case_14(x: T) { funAny() funNullableT() funNullableAny() - get() + get() this.equals(null) this.propT this.propAny @@ -824,11 +824,11 @@ fun ?> case_14(x: T) { this.funAny() this.funNullableT() this.funNullableAny() - this.get() + this.get() } x.also { it - it.get() + it.get() it.equals(null) it.propT it.propAny @@ -859,7 +859,7 @@ fun ?> case_15(x: T) { x.funAny() x.funNullableT() x.funNullableAny() - x.itest() + x.itest() x.equals(null) @@ -878,7 +878,7 @@ fun ?> case_15(x: T) { x.funNullableT() x.funNullableAny() - x.itest() + x.itest() x.apply { this equals(null) @@ -890,7 +890,7 @@ fun ?> case_15(x: T) { funAny() funNullableT() funNullableAny() - itest() + itest() this.equals(null) this.propT this.propAny @@ -900,11 +900,11 @@ fun ?> case_15(x: T) { this.funAny() this.funNullableT() this.funNullableAny() - this.itest() + this.itest() } x.also { it - it.itest() + it.itest() it.equals(null) it.propT it.propAny @@ -935,7 +935,7 @@ fun ?> case_16(x: T) { x.funAny() x.funNullableT() x.funNullableAny() - x.ip1test1() + x.ip1test1() x.equals(null) @@ -954,7 +954,7 @@ fun ?> case_16(x: T) { x.funNullableT() x.funNullableAny() - x.ip1test1() + x.ip1test1() x.apply { this equals(null) @@ -966,7 +966,7 @@ fun ?> case_16(x: T) { funAny() funNullableT() funNullableAny() - ip1test1() + ip1test1() this.equals(null) this.propT this.propAny @@ -976,11 +976,11 @@ fun ?> case_16(x: T) { this.funAny() this.funNullableT() this.funNullableAny() - this.ip1test1() + this.ip1test1() } x.also { it - it.ip1test1() + it.ip1test1() it.equals(null) it.propT it.propAny @@ -1011,7 +1011,7 @@ fun ?> case_17(x: T) { x.funAny() x.funNullableT() x.funNullableAny() - x.ip1test1() + x.ip1test1() x.equals(null) @@ -1030,7 +1030,7 @@ fun ?> case_17(x: T) { x.funNullableT() x.funNullableAny() - x.ip1test1() + x.ip1test1() x.apply { this equals(null) @@ -1042,7 +1042,7 @@ fun ?> case_17(x: T) { funAny() funNullableT() funNullableAny() - ip1test1() + ip1test1() this.equals(null) this.propT this.propAny @@ -1052,11 +1052,11 @@ fun ?> case_17(x: T) { this.funAny() this.funNullableT() this.funNullableAny() - this.ip1test1() + this.ip1test1() } x.also { it - it.ip1test1() + it.ip1test1() it.equals(null) it.propT it.propAny @@ -1089,7 +1089,7 @@ fun ?> case_18(x: T) { y.funAny() y.funNullableT() y.funNullableAny() - y.ip1test1() + y.ip1test1() x.equals(null) @@ -1108,7 +1108,7 @@ fun ?> case_18(x: T) { x.funNullableT() x.funNullableAny() - x.ip1test1() + x.ip1test1() x.apply { this equals(null) @@ -1120,7 +1120,7 @@ fun ?> case_18(x: T) { funAny() funNullableT() funNullableAny() - ip1test1() + ip1test1() this.equals(null) this.propT this.propAny @@ -1130,11 +1130,11 @@ fun ?> case_18(x: T) { this.funAny() this.funNullableT() this.funNullableAny() - this.ip1test1() + this.ip1test1() } x.also { it - it.ip1test1() + it.ip1test1() it.equals(null) it.propT it.propAny @@ -1165,7 +1165,7 @@ fun ?> case_19(x: T) { x.funAny() x.funNullableT() x.funNullableAny() - x.ip1test1() + x.ip1test1() x.equals(null) @@ -1184,7 +1184,7 @@ fun ?> case_19(x: T) { x.funNullableT() x.funNullableAny() - x.ip1test1() + x.ip1test1() x.apply { this equals(null) @@ -1196,7 +1196,7 @@ fun ?> case_19(x: T) { funAny() funNullableT() funNullableAny() - ip1test1() + ip1test1() this.equals(null) this.propT this.propAny @@ -1206,11 +1206,11 @@ fun ?> case_19(x: T) { this.funAny() this.funNullableT() this.funNullableAny() - this.ip1test1() + this.ip1test1() } x.also { it - it.ip1test1() + it.ip1test1() it.equals(null) it.propT it.propAny @@ -1241,8 +1241,8 @@ fun case_20(x: T) where T: InterfaceWithTypeParameter1?, T: InterfaceW x.funAny() x.funNullableT() x.funNullableAny() - x.ip1test1() - x.ip1test2() + x.ip1test1() + x.ip1test2() x.equals(null) @@ -1261,8 +1261,8 @@ fun case_20(x: T) where T: InterfaceWithTypeParameter1?, T: InterfaceW x.funNullableT() x.funNullableAny() - x.ip1test1() - x.ip1test2() + x.ip1test1() + x.ip1test2() x.apply { this equals(null) @@ -1274,8 +1274,8 @@ fun case_20(x: T) where T: InterfaceWithTypeParameter1?, T: InterfaceW funAny() funNullableT() funNullableAny() - ip1test1() - ip1test2() + ip1test1() + ip1test2() this.equals(null) this.propT this.propAny @@ -1285,8 +1285,8 @@ fun case_20(x: T) where T: InterfaceWithTypeParameter1?, T: InterfaceW this.funAny() this.funNullableT() this.funNullableAny() - this.ip1test1() - this.ip1test2() + this.ip1test1() + this.ip1test2() } x.also { it @@ -1299,8 +1299,8 @@ fun case_20(x: T) where T: InterfaceWithTypeParameter1?, T: InterfaceW it.funAny() it.funNullableT() it.funNullableAny() - it.ip1test1() - it.ip1test2() + it.ip1test1() + it.ip1test2() } } } @@ -1322,8 +1322,8 @@ fun case_21(x: T) where T: InterfaceWithTypeParameter1?, T: InterfaceW x.funAny() x.funNullableT() x.funNullableAny() - x.ip1test1() - x.ip1test2() + x.ip1test1() + x.ip1test2() x.ip1test3() x.equals(null) @@ -1343,8 +1343,8 @@ fun case_21(x: T) where T: InterfaceWithTypeParameter1?, T: InterfaceW x.funNullableT() x.funNullableAny() - x.ip1test1() - x.ip1test2() + x.ip1test1() + x.ip1test2() x.ip1test3() x.apply { this @@ -1357,8 +1357,8 @@ fun case_21(x: T) where T: InterfaceWithTypeParameter1?, T: InterfaceW funAny() funNullableT() funNullableAny() - ip1test1() - ip1test2() + ip1test1() + ip1test2() ip1test3() this.equals(null) this.propT @@ -1369,8 +1369,8 @@ fun case_21(x: T) where T: InterfaceWithTypeParameter1?, T: InterfaceW this.funAny() this.funNullableT() this.funNullableAny() - this.ip1test1() - this.ip1test2() + this.ip1test1() + this.ip1test2() this.ip1test3() } x.also { @@ -1384,8 +1384,8 @@ fun case_21(x: T) where T: InterfaceWithTypeParameter1?, T: InterfaceW it.funAny() it.funNullableT() it.funNullableAny() - it.ip1test1() - it.ip1test2() + it.ip1test1() + it.ip1test2() it.ip1test3() } } @@ -3212,7 +3212,7 @@ fun case_47(x: T?) where T : Inv, T: Comparable<*>?, T: InterfaceWithType x.funNullableT() x.funNullableAny() x.test() - x.ip1test1() + x.ip1test1() x.equals(null) @@ -3232,7 +3232,7 @@ fun case_47(x: T?) where T : Inv, T: Comparable<*>?, T: InterfaceWithType x.funNullableAny() x.test() - x.ip1test1() + x.ip1test1() x.apply { this equals(null) @@ -3245,7 +3245,7 @@ fun case_47(x: T?) where T : Inv, T: Comparable<*>?, T: InterfaceWithType funNullableT() funNullableAny() test() - ip1test1() + ip1test1() this.equals(null) this.propT this.propAny @@ -3256,7 +3256,7 @@ fun case_47(x: T?) where T : Inv, T: Comparable<*>?, T: InterfaceWithType this.funNullableT() this.funNullableAny() this.test() - this.ip1test1() + this.ip1test1() } x.also { it @@ -3270,19 +3270,19 @@ fun case_47(x: T?) where T : Inv, T: Comparable<*>?, T: InterfaceWithType it.funNullableT() it.funNullableAny() it.test() - it.ip1test1() + it.ip1test1() } - x.compareTo(return) - x.compareTo(return) + x.compareTo(return) + x.compareTo(return) x.apply { - compareTo(return) - this.compareTo(return) + compareTo(return) + this.compareTo(return) } x.also { - it.compareTo(return) + it.compareTo(return) } } } @@ -3305,7 +3305,7 @@ fun case_48(x: T?) where T : Inv, T: InterfaceWithTypeParameter1x.funNullableT() x.funNullableAny() x.test() - x.ip1test1() + x.ip1test1() x.equals(null) @@ -3325,7 +3325,7 @@ fun case_48(x: T?) where T : Inv, T: InterfaceWithTypeParameter1x.test() - x.ip1test1() + x.ip1test1() x.apply { this equals(null) @@ -3338,7 +3338,7 @@ fun case_48(x: T?) where T : Inv, T: InterfaceWithTypeParameter1ip1test1() this.equals(null) this.propT this.propAny @@ -3349,7 +3349,7 @@ fun case_48(x: T?) where T : Inv, T: InterfaceWithTypeParameter1this.funNullableT() this.funNullableAny() this.test() - this.ip1test1() + this.ip1test1() } x.also { it @@ -3363,7 +3363,7 @@ fun case_48(x: T?) where T : Inv, T: InterfaceWithTypeParameter1it.funNullableT() it.funNullableAny() it.test() - it.ip1test1() + it.ip1test1() } } } @@ -3386,7 +3386,7 @@ fun case_49(x: T?) where T : Inv, T: InterfaceWithTypeParameter1 x.funNullableT() x.funNullableAny() x.test() - x.ip1test1() + x.ip1test1() x.equals(null) @@ -3406,7 +3406,7 @@ fun case_49(x: T?) where T : Inv, T: InterfaceWithTypeParameter1 x.funNullableAny() x.test() - x.ip1test1() + x.ip1test1() x.apply { this equals(null) @@ -3419,7 +3419,7 @@ fun case_49(x: T?) where T : Inv, T: InterfaceWithTypeParameter1 funNullableT() funNullableAny() test() - ip1test1() + ip1test1() this.equals(null) this.propT this.propAny @@ -3430,7 +3430,7 @@ fun case_49(x: T?) where T : Inv, T: InterfaceWithTypeParameter1 this.funNullableT() this.funNullableAny() this.test() - this.ip1test1() + this.ip1test1() } x.also { it @@ -3444,7 +3444,7 @@ fun case_49(x: T?) where T : Inv, T: InterfaceWithTypeParameter1 it.funNullableT() it.funNullableAny() it.test() - it.ip1test1() + it.ip1test1() } } } @@ -3467,7 +3467,7 @@ fun case_50(x: T?) where T : Inv, T: InterfaceWithTypeParameter1x.funNullableT() x.funNullableAny() x.test() - x.ip1test1() + x.ip1test1() x.equals(null) @@ -3487,7 +3487,7 @@ fun case_50(x: T?) where T : Inv, T: InterfaceWithTypeParameter1x.test() - x.ip1test1() + x.ip1test1() x.apply { this equals(null) @@ -3500,7 +3500,7 @@ fun case_50(x: T?) where T : Inv, T: InterfaceWithTypeParameter1ip1test1() this.equals(null) this.propT this.propAny @@ -3511,7 +3511,7 @@ fun case_50(x: T?) where T : Inv, T: InterfaceWithTypeParameter1this.funNullableT() this.funNullableAny() this.test() - this.ip1test1() + this.ip1test1() } x.also { it @@ -3525,7 +3525,7 @@ fun case_50(x: T?) where T : Inv, T: InterfaceWithTypeParameter1it.funNullableT() it.funNullableAny() it.test() - it.ip1test1() + it.ip1test1() } } } @@ -3548,7 +3548,7 @@ fun case_51(x: T?) where T : Inv, T: InterfaceWithTypeParameter1? x.funNullableT() x.funNullableAny() x.test() - x.ip1test1() + x.ip1test1() x.equals(null) @@ -3568,7 +3568,7 @@ fun case_51(x: T?) where T : Inv, T: InterfaceWithTypeParameter1? x.funNullableAny() x.test() - x.ip1test1() + x.ip1test1() x.apply { this equals(null) @@ -3581,7 +3581,7 @@ fun case_51(x: T?) where T : Inv, T: InterfaceWithTypeParameter1? funNullableT() funNullableAny() test() - ip1test1() + ip1test1() this.equals(null) this.propT this.propAny @@ -3592,7 +3592,7 @@ fun case_51(x: T?) where T : Inv, T: InterfaceWithTypeParameter1? this.funNullableT() this.funNullableAny() this.test() - this.ip1test1() + this.ip1test1() } x.also { it @@ -3606,7 +3606,7 @@ fun case_51(x: T?) where T : Inv, T: InterfaceWithTypeParameter1? it.funNullableT() it.funNullableAny() it.test() - it.ip1test1() + it.ip1test1() } } } @@ -3706,7 +3706,7 @@ fun case_53(x: T?) where T : Inv, T: InterfaceWithTypeParameter1<*>? { x.funNullableT() x.funNullableAny() x.test() - x.ip1test1() + x.ip1test1() x.equals(null) @@ -3726,7 +3726,7 @@ fun case_53(x: T?) where T : Inv, T: InterfaceWithTypeParameter1<*>? { x.funNullableAny() x.test() - x.ip1test1() + x.ip1test1() x.apply { this equals(null) @@ -3739,7 +3739,7 @@ fun case_53(x: T?) where T : Inv, T: InterfaceWithTypeParameter1<*>? { funNullableT() funNullableAny() test() - ip1test1() + ip1test1() this.equals(null) this.propT this.propAny @@ -3750,7 +3750,7 @@ fun case_53(x: T?) where T : Inv, T: InterfaceWithTypeParameter1<*>? { this.funNullableT() this.funNullableAny() this.test() - this.ip1test1() + this.ip1test1() } x.also { it @@ -3764,7 +3764,7 @@ fun case_53(x: T?) where T : Inv, T: InterfaceWithTypeParameter1<*>? { it.funNullableT() it.funNullableAny() it.test() - it.ip1test1() + it.ip1test1() } } } @@ -3787,7 +3787,7 @@ fun case_54(x: T?) where T : Inv<*>, T: InterfaceWithTypeParameter1? x.funNullableT() x.funNullableAny() x.test() - x.ip1test1() + x.ip1test1() x.equals(null) @@ -3807,7 +3807,7 @@ fun case_54(x: T?) where T : Inv<*>, T: InterfaceWithTypeParameter1? x.funNullableAny() x.test() - x.ip1test1() + x.ip1test1() x.apply { this equals(null) @@ -3820,7 +3820,7 @@ fun case_54(x: T?) where T : Inv<*>, T: InterfaceWithTypeParameter1? funNullableT() funNullableAny() test() - ip1test1() + ip1test1() this.equals(null) this.propT this.propAny @@ -3831,7 +3831,7 @@ fun case_54(x: T?) where T : Inv<*>, T: InterfaceWithTypeParameter1? this.funNullableT() this.funNullableAny() this.test() - this.ip1test1() + this.ip1test1() } x.also { it @@ -3845,7 +3845,7 @@ fun case_54(x: T?) where T : Inv<*>, T: InterfaceWithTypeParameter1? it.funNullableT() it.funNullableAny() it.test() - it.ip1test1() + it.ip1test1() } } } @@ -4174,9 +4174,9 @@ fun case_59(x: T) where T: InterfaceWithFiveTypeParameters1x.funAny() x.funNullableT() x.funNullableAny() - x.itest1() - x.itest2() - x.itest3() + x.itest1() + x.itest2() + x.itest3() x.equals(null) @@ -4195,9 +4195,9 @@ fun case_59(x: T) where T: InterfaceWithFiveTypeParameters1x.itest1() - x.itest2() - x.itest3() + x.itest1() + x.itest2() + x.itest3() x.apply { this equals(null) @@ -4209,9 +4209,9 @@ fun case_59(x: T) where T: InterfaceWithFiveTypeParameters1itest1() + itest2() + itest3() this.equals(null) this.propT this.propAny @@ -4221,9 +4221,9 @@ fun case_59(x: T) where T: InterfaceWithFiveTypeParameters1this.funAny() this.funNullableT() this.funNullableAny() - this.itest1() - this.itest2() - this.itest3() + this.itest1() + this.itest2() + this.itest3() } x.also { it @@ -4236,9 +4236,9 @@ fun case_59(x: T) where T: InterfaceWithFiveTypeParameters1it.funAny() it.funNullableT() it.funNullableAny() - it.itest1() - it.itest2() - it.itest3() + it.itest1() + it.itest2() + it.itest3() } } } @@ -4260,7 +4260,7 @@ fun ?> case_60(x: T) { x.funAny() x.funNullableT() x.funNullableAny() - x.ip1test1() + x.ip1test1() x.equals(null) @@ -4279,7 +4279,7 @@ fun ?> case_60(x: T) { x.funNullableT() x.funNullableAny() - x.ip1test1() + x.ip1test1() x.apply { this equals(null) @@ -4291,7 +4291,7 @@ fun ?> case_60(x: T) { funAny() funNullableT() funNullableAny() - ip1test1() + ip1test1() this.equals(null) this.propT this.propAny @@ -4301,7 +4301,7 @@ fun ?> case_60(x: T) { this.funAny() this.funNullableT() this.funNullableAny() - this.ip1test1() + this.ip1test1() } x.also { it @@ -4314,7 +4314,7 @@ fun ?> case_60(x: T) { it.funAny() it.funNullableT() it.funNullableAny() - it.ip1test1() + it.ip1test1() } } } diff --git a/compiler/tests-spec/testData/diagnostics/notLinked/dfa/pos/14.kt b/compiler/tests-spec/testData/diagnostics/notLinked/dfa/pos/14.kt index cc73ab02acb..70ed79e84da 100644 --- a/compiler/tests-spec/testData/diagnostics/notLinked/dfa/pos/14.kt +++ b/compiler/tests-spec/testData/diagnostics/notLinked/dfa/pos/14.kt @@ -22,7 +22,7 @@ fun case_1(vararg x: Int?) { fun case_2(vararg x: Int?) { x[0].apply { if (this != null) { - this + this this.inv() } } @@ -47,7 +47,7 @@ fun case_3(vararg x: T?) { fun case_4(vararg x: T?) { x[0].apply { if (this != null) { - this + this this.toByte() } } diff --git a/compiler/tests-spec/testData/diagnostics/notLinked/dfa/pos/15.kt b/compiler/tests-spec/testData/diagnostics/notLinked/dfa/pos/15.kt index e5494c6369c..fa271be4fb0 100644 --- a/compiler/tests-spec/testData/diagnostics/notLinked/dfa/pos/15.kt +++ b/compiler/tests-spec/testData/diagnostics/notLinked/dfa/pos/15.kt @@ -20,19 +20,38 @@ fun case_1() { val a = select(Case1_1(), Case1_2(), null) if (a != null) { - & InterfaceWithTypeParameter1<*>?")!>a - val b = & InterfaceWithTypeParameter1<*>?")!>a.ip1test1() + >>>>> & InterfaceWithTypeParameter1>>>>>?")!>a + val b = >>>>> & InterfaceWithTypeParameter1>>>>>?")!>a.ip1test1() if (b != null) { - b - b.equals(null) - b.propT - b.propAny - b.propNullableT - b.propNullableAny - b.funT() - b.funAny() - b.funNullableT() - b.funNullableAny() + >>>> & InterfaceWithTypeParameter1>>>>?")!>b + val c = >>>> & InterfaceWithTypeParameter1>>>>?")!>b.ip1test1() + if (c != null) { + >>> & InterfaceWithTypeParameter1>>>?")!>c + val d = >>> & InterfaceWithTypeParameter1>>>?")!>c.ip1test1() + if (d != null) { + >> & InterfaceWithTypeParameter1>>?")!>d + val e = >> & InterfaceWithTypeParameter1>>?")!>d.ip1test1() + if (e != null) { + > & InterfaceWithTypeParameter1>?")!>e + val f = > & InterfaceWithTypeParameter1>?")!>e.ip1test1() + if (f != null) { + & InterfaceWithTypeParameter1<*>?")!>f + val g = & InterfaceWithTypeParameter1<*>?")!>f.ip1test1() + if (g != null) { + g.equals(null) + g.propT + g.propAny + g.propNullableT + g.propNullableAny + g.funT() + g.funAny() + g.funNullableT() + g.funNullableAny() + } + } + } + } + } } } } @@ -158,21 +177,24 @@ fun case_9() { val x = select(Case9_1(), Case9_2(), null) if (x != null) { - & ClassWithTwoTypeParameters<*, *>?")!>x - & ClassWithTwoTypeParameters<*, *>?")!>x.test1() + , out ClassWithTwoTypeParameters<*, *>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>>>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>>>>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>>>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>>>>>> & ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>>>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>>>>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>>>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>>>>>>?")!>x + , out ClassWithTwoTypeParameters<*, *>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>>>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>>>>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>>>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>>>>>> & ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>>>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>>>>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>>>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>>>>>>?")!>x.test1() val y = x.test2() if (y != null) { - y - y - y.equals(null) - y.propT - y.propAny - y.propNullableT - y.propNullableAny - y.funT() - y.funAny() - y.funNullableT() - y.funNullableAny() + , out ClassWithTwoTypeParameters<*, *>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>>>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>>>>> & ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>>>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>>>>>?")!>y + val z = , out ClassWithTwoTypeParameters<*, *>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>>>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>>>>> & ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>>>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>>>>>?")!>y.test2() + if (z != null) { + , out ClassWithTwoTypeParameters<*, *>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>>>> & ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>>>>?")!>z + , out ClassWithTwoTypeParameters<*, *>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>>>> & ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>>>>?")!>z.equals(null) + , out ClassWithTwoTypeParameters<*, *>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>>>> & ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>>>>?")!>z.propT + , out ClassWithTwoTypeParameters<*, *>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>>>> & ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>>>>?")!>z.propAny + , out ClassWithTwoTypeParameters<*, *>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>>>> & ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>>>>?")!>z.propNullableT + , out ClassWithTwoTypeParameters<*, *>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>>>> & ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>>>>?")!>z.propNullableAny + , out ClassWithTwoTypeParameters<*, *>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>>>> & ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>>>>?")!>z.funT() + , out ClassWithTwoTypeParameters<*, *>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>>>> & ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>>>>?")!>z.funAny() + , out ClassWithTwoTypeParameters<*, *>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>>>> & ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>>>>?")!>z.funNullableT() + , out ClassWithTwoTypeParameters<*, *>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>>>> & ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>, out ClassWithTwoTypeParameters, out ClassWithTwoTypeParameters<*, *>>>>>?")!>z.funNullableAny() + } } } } diff --git a/compiler/tests-spec/testData/diagnostics/notLinked/dfa/pos/25.kt b/compiler/tests-spec/testData/diagnostics/notLinked/dfa/pos/25.kt index c665a7fd843..1d2bbad55ba 100644 --- a/compiler/tests-spec/testData/diagnostics/notLinked/dfa/pos/25.kt +++ b/compiler/tests-spec/testData/diagnostics/notLinked/dfa/pos/25.kt @@ -26,6 +26,7 @@ open class Case1 { x.get(0) x.size x.isEmpty() + x[null] } } } diff --git a/compiler/tests-spec/testData/diagnostics/notLinked/dfa/pos/26.kt b/compiler/tests-spec/testData/diagnostics/notLinked/dfa/pos/26.kt index bfb473cc7e2..5e500da4ff9 100644 --- a/compiler/tests-spec/testData/diagnostics/notLinked/dfa/pos/26.kt +++ b/compiler/tests-spec/testData/diagnostics/notLinked/dfa/pos/26.kt @@ -26,6 +26,7 @@ open class Case1 { x.get(0) x.size x.isEmpty() + x[null] } } } diff --git a/compiler/tests-spec/testData/diagnostics/notLinked/dfa/pos/27.kt b/compiler/tests-spec/testData/diagnostics/notLinked/dfa/pos/27.kt index 1f105e663be..6e0edcc9659 100644 --- a/compiler/tests-spec/testData/diagnostics/notLinked/dfa/pos/27.kt +++ b/compiler/tests-spec/testData/diagnostics/notLinked/dfa/pos/27.kt @@ -26,6 +26,7 @@ open class Case1 { x.get(0) x.size x.isEmpty() + x[null] } } } diff --git a/compiler/tests-spec/testData/diagnostics/notLinked/dfa/pos/3.kt b/compiler/tests-spec/testData/diagnostics/notLinked/dfa/pos/3.kt index 9d4af861851..0be8a3e5dad 100644 --- a/compiler/tests-spec/testData/diagnostics/notLinked/dfa/pos/3.kt +++ b/compiler/tests-spec/testData/diagnostics/notLinked/dfa/pos/3.kt @@ -226,8 +226,8 @@ fun case_19(b: Boolean) { } } else null - if (a != null && a.B19 != null && a.B19.C19 != null && a.B19.C19.D19 != null && a.B19.C19.D19.x == null) { - a.B19.C19.D19.x + if (a != null && a.B19 != null && a.B19.C19 != null && a.B19.C19.D19 != null && a.B19.C19.D19.x == null) { + a.B19.C19.D19.x } } @@ -296,7 +296,7 @@ fun case_25(b: Boolean) { val y = if (b) x else null if (y != null) { - val z = .?")!> case_25..?)? & () -> case_25..?"), DEBUG_INFO_SMARTCAST!>y() + val z = .?")!> case_25..?)? & () -> case_25..?"), NI;DEBUG_INFO_SMARTCAST!>y() if (z == null) { .? & kotlin.Nothing?")!>z diff --git a/compiler/tests-spec/testData/diagnostics/notLinked/dfa/pos/32.kt b/compiler/tests-spec/testData/diagnostics/notLinked/dfa/pos/32.kt index 22537de04d1..37d2a387e67 100644 --- a/compiler/tests-spec/testData/diagnostics/notLinked/dfa/pos/32.kt +++ b/compiler/tests-spec/testData/diagnostics/notLinked/dfa/pos/32.kt @@ -15,7 +15,7 @@ fun case_1(x: T?, y: K?) { x as T y as K - val z = x ?: y + val z = x ?: y x.equals(10) z diff --git a/compiler/tests-spec/testData/diagnostics/notLinked/dfa/pos/4.kt b/compiler/tests-spec/testData/diagnostics/notLinked/dfa/pos/4.kt index ed19e72e61a..3f8acb3438b 100644 --- a/compiler/tests-spec/testData/diagnostics/notLinked/dfa/pos/4.kt +++ b/compiler/tests-spec/testData/diagnostics/notLinked/dfa/pos/4.kt @@ -128,7 +128,7 @@ fun case_12(x: TypealiasString, y: TypealiasString) = if (x != null) { 1 - } else x + } else x // TESTCASE NUMBER: 14 class A14 { @@ -228,8 +228,8 @@ fun case_19(b: Boolean) { } } else null - if (a != null && a.B19 != null && a.B19.C19 != null && a.B19.C19.D19 != null && a.B19.C19.D19.x == null) { - a.B19.C19.D19.x + if (a != null && a.B19 != null && a.B19.C19 != null && a.B19.C19.D19 != null && a.B19.C19.D19.x == null) { + a.B19.C19.D19.x } } diff --git a/compiler/tests-spec/testData/diagnostics/notLinked/dfa/pos/40.kt b/compiler/tests-spec/testData/diagnostics/notLinked/dfa/pos/40.kt index 4b54103bae4..a12fd20d35e 100644 --- a/compiler/tests-spec/testData/diagnostics/notLinked/dfa/pos/40.kt +++ b/compiler/tests-spec/testData/diagnostics/notLinked/dfa/pos/40.kt @@ -56,14 +56,11 @@ fun case_5(x: Any?) { } } -/* - * TESTCASE NUMBER: 6 - * UNEXPECTED BEHAVIOUR - */ +// TESTCASE NUMBER: 6 fun case_6(x: Any?) { if (x is Boolean? && x!!) { - x.not() - select(x).not() + x.not() + select(x).not() } } diff --git a/compiler/tests-spec/testData/diagnostics/notLinked/dfa/pos/41.kt b/compiler/tests-spec/testData/diagnostics/notLinked/dfa/pos/41.kt index 3c16fb00041..5e12c2a1b14 100644 --- a/compiler/tests-spec/testData/diagnostics/notLinked/dfa/pos/41.kt +++ b/compiler/tests-spec/testData/diagnostics/notLinked/dfa/pos/41.kt @@ -19,7 +19,7 @@ fun case_1(x: Any) { if (x is Interface1) { if (x is Interface2) { x - x.itest() + x.itest() x.itest1() x.itest2() } diff --git a/compiler/tests-spec/testData/diagnostics/notLinked/dfa/pos/5.kt b/compiler/tests-spec/testData/diagnostics/notLinked/dfa/pos/5.kt index 70945af5c2f..418abfe7b11 100644 --- a/compiler/tests-spec/testData/diagnostics/notLinked/dfa/pos/5.kt +++ b/compiler/tests-spec/testData/diagnostics/notLinked/dfa/pos/5.kt @@ -361,7 +361,7 @@ fun case_15(x: Any?) { } // TESTCASE NUMBER: 16 -fun case_16(a: Any?, b: Int = if (a is Number? && a is Int? && a !== null) a else 0) { +fun case_16(a: Any?, b: Int = if (a is Number? && a is Int? && a !== null) a else 0) { a b b.equals(null) @@ -376,7 +376,7 @@ fun case_16(a: Any?, b: Int = if (a is Number? && a is Int? && a !== null) a) { +fun case_17(a: Any?, b: Int = if (a !is Number? || a !is Int? || a == null) 0 else a) { a b b.equals(null) diff --git a/compiler/tests-spec/testData/diagnostics/notLinked/dfa/pos/50.kt b/compiler/tests-spec/testData/diagnostics/notLinked/dfa/pos/50.kt index e4ba32c2ea7..f0ee96c8535 100644 --- a/compiler/tests-spec/testData/diagnostics/notLinked/dfa/pos/50.kt +++ b/compiler/tests-spec/testData/diagnostics/notLinked/dfa/pos/50.kt @@ -75,8 +75,8 @@ fun ClassWithSixTypeParameters.case_5() { */ fun case_6(y: Inv) { if (y.prop_3 is MutableList<*>) { - ")!>y.prop_3 - "), DEBUG_INFO_SMARTCAST!>y.prop_3[0] + y.prop_3 + y.prop_3[0] } } @@ -87,10 +87,10 @@ fun case_6(y: Inv) { */ fun Inv.case_7() { if (this.prop_3 is MutableList<*>) { - ")!>this.prop_3 - "), DEBUG_INFO_SMARTCAST!>this.prop_3[0] - ")!>prop_3 - "), DEBUG_INFO_SMARTCAST!>prop_3[0] + this.prop_3 + this.prop_3[0] + prop_3 + prop_3[0] } } diff --git a/compiler/tests-spec/testData/diagnostics/notLinked/dfa/pos/51.kt b/compiler/tests-spec/testData/diagnostics/notLinked/dfa/pos/51.kt index e6fb2e1792a..1a2242b7490 100644 --- a/compiler/tests-spec/testData/diagnostics/notLinked/dfa/pos/51.kt +++ b/compiler/tests-spec/testData/diagnostics/notLinked/dfa/pos/51.kt @@ -149,12 +149,13 @@ fun case_12(z: Any?) { /* * TESTCASE NUMBER: 13 + * UNEXPECTED BEHAVIOUR * ISSUES: KT-30927 */ fun case_13(z: Any?) { val y = z.run { if (this is ClassLevel6) - return@run this + return@run this this as ClassLevel3 } y @@ -199,13 +200,14 @@ fun case_16(z: Any?) { /* * TESTCASE NUMBER: 17 + * UNEXPECTED BEHAVIOUR * ISSUES: KT-30927 */ fun case_17(z: Any?) { val y = z.run { when (this) { is Class? -> this!! - is Class -> return@run this + is Class -> return@run this is Float -> Class() else -> return@run Class() } @@ -216,12 +218,13 @@ fun case_17(z: Any?) { /* * TESTCASE NUMBER: 18 + * UNEXPECTED BEHAVIOUR * ISSUES: KT-30927 */ fun case_18(z: Any?) { val y = z.run { this as Int - this + this } y y.inv() @@ -239,12 +242,13 @@ fun case_19(z: Any?) { /* * TESTCASE NUMBER: 20 + * UNEXPECTED BEHAVIOUR * ISSUES: KT-30927 */ fun case_20(z: Any?) { val y = z.run { this!! - this + this } y y.equals(10) @@ -334,12 +338,13 @@ fun case_27(z: Any?) { /* * TESTCASE NUMBER: 28 + * UNEXPECTED BEHAVIOUR * ISSUES: KT-30927 */ fun case_28(z: Any?) { val y = z.run { if (this == null) throw IllegalStateException() - this + this } y y.equals(10) diff --git a/compiler/tests-spec/testData/diagnostics/notLinked/dfa/pos/55.kt b/compiler/tests-spec/testData/diagnostics/notLinked/dfa/pos/55.kt index a31bfd36279..81e4a51a49f 100644 --- a/compiler/tests-spec/testData/diagnostics/notLinked/dfa/pos/55.kt +++ b/compiler/tests-spec/testData/diagnostics/notLinked/dfa/pos/55.kt @@ -29,7 +29,7 @@ fun case_1(x: Any) { fun case_2(x: Any?) { if (x is String?) { x!!.length - x + x } } @@ -51,6 +51,6 @@ fun case_3(x: Any) { fun case_4(x: Any?) { if (x is Map.Entry<*, *>?) { ")!>x!!.value - ?")!>x + ")!>x } } \ No newline at end of file diff --git a/compiler/tests-spec/testData/diagnostics/notLinked/dfa/pos/57.kt b/compiler/tests-spec/testData/diagnostics/notLinked/dfa/pos/57.kt index 24bb74cb491..5a452956efe 100644 --- a/compiler/tests-spec/testData/diagnostics/notLinked/dfa/pos/57.kt +++ b/compiler/tests-spec/testData/diagnostics/notLinked/dfa/pos/57.kt @@ -20,8 +20,8 @@ fun case_1(x: Any?) { if (x is String) { x val y = if (true) Class::fun_1 else Class::fun_1 - x - val z: String = x + x + val z: String = x } } @@ -38,8 +38,8 @@ fun case_2(x: Any?, b: Boolean?) { false -> Class::fun_2 null -> Class::fun_3 } - x - val z: Any = x + x + val z: Any = x } /* @@ -53,8 +53,8 @@ fun case_3(x: Any?, b: Boolean?) { val y = when (b) { else -> Class::fun_1 } - x - val z: Int = x + x + val z: Int = x } // TESTCASE NUMBER: 4 @@ -77,8 +77,8 @@ fun case_5(x: Any?, b: Class) { x as Int x val y = if (true) b::fun_1 else b::fun_1 - x - val z: Int = x + x + val z: Int = x } /* @@ -91,9 +91,9 @@ fun case_6(x: Any?, b: Class) { val z1 = x x val y = if (true) b::fun_1 else b::fun_1 - x - z1 - val z2: Int = z1 + x + z1 + val z2: Int = z1 } /* @@ -106,8 +106,8 @@ fun case_7(x: Any?) { if (x is String) { x val y = if (true) ::case_7_1 else ::case_7_1 - x - val z: String = x + x + val z: String = x } } diff --git a/compiler/tests-spec/testData/diagnostics/notLinked/dfa/pos/6.kt b/compiler/tests-spec/testData/diagnostics/notLinked/dfa/pos/6.kt index 8879ec6da4a..137eb3da727 100644 --- a/compiler/tests-spec/testData/diagnostics/notLinked/dfa/pos/6.kt +++ b/compiler/tests-spec/testData/diagnostics/notLinked/dfa/pos/6.kt @@ -716,6 +716,7 @@ fun case_36(x: Any) { if (x == z) { x + x.java } } @@ -734,6 +735,7 @@ fun case_38() { if (Object.prop_2 != z) else { Object.prop_2 + Object.prop_2.java } } @@ -988,6 +990,7 @@ fun case_57(a: (() -> Unit)) { if (a == z) { kotlin.Unit & kotlin.Nothing")!>a + kotlin.Unit & kotlin.Nothing"), DEBUG_INFO_SMARTCAST!>a.java } } @@ -998,6 +1001,7 @@ fun case_58(a: ((Float) -> Int?)?, b: Float?, z: Nothing?) { b if (a != z) { kotlin.Int?)? & (kotlin.Float) -> kotlin.Int? & kotlin.Nothing")!>a + kotlin.Int?)? & kotlin.Nothing"), DEBUG_INFO_SMARTCAST!>a.java } } } @@ -1281,7 +1285,7 @@ fun case_71(t: Any?) { t t.itest1() t.itest2() - t.itest() + t.itest() t.let { it.itest1(); it.itest2() } } @@ -1302,7 +1306,7 @@ fun case_72(t: Any?, z1: Nothing?) { t t.itest1() t.itest2() - t.itest() + t.itest() t.let { it.itest1(); it.itest2() } } @@ -1324,7 +1328,7 @@ fun case_73(t: Any?) { if (t != `null`) { t.itest2() t.itest1() - t.itest() + t.itest() t.test1() t.test2() t @@ -1349,7 +1353,7 @@ fun case_74(t: Any?) { if (t is Interface3?) { t.itest2() t.itest1() - t.itest() + t.itest() t.test1() t.test2() t @@ -1372,17 +1376,17 @@ fun case_75(t: Any?, z: Nothing?) { if (t !is Interface2? || t !is Interface3?) {} else { t.itest2() t.itest1() - t.itest() + t.itest() t.test1() t.test2() - t + t } } } } // TESTCASE NUMBER: 76 -fun case_76(a: Any?, b: Int = if (a !is Number? === true || a !is Int? == true || a != null == false == true) 0 else a) { +fun case_76(a: Any?, b: Int = if (a !is Number? === true || a !is Int? == true || a != null == false == true) 0 else a) { a b b.equals(null) diff --git a/compiler/tests-spec/testData/diagnostics/notLinked/dfa/pos/64.kt b/compiler/tests-spec/testData/diagnostics/notLinked/dfa/pos/64.kt index b7c696bc96b..35b945293d6 100644 --- a/compiler/tests-spec/testData/diagnostics/notLinked/dfa/pos/64.kt +++ b/compiler/tests-spec/testData/diagnostics/notLinked/dfa/pos/64.kt @@ -26,7 +26,7 @@ class Case1 { x = getT() } x - return x + return x } } @@ -59,7 +59,7 @@ class Case3 { var x = getTN() x = x ?: getT() x - return x + return x } } diff --git a/compiler/tests-spec/testData/diagnostics/notLinked/dfa/pos/72.kt b/compiler/tests-spec/testData/diagnostics/notLinked/dfa/pos/72.kt index c3e51d15681..22c349ca714 100644 --- a/compiler/tests-spec/testData/diagnostics/notLinked/dfa/pos/72.kt +++ b/compiler/tests-spec/testData/diagnostics/notLinked/dfa/pos/72.kt @@ -22,5 +22,5 @@ fun case_1() { val strs = list as MutableList strs.add("two") & kotlin.collections.MutableList")!>list - val s: String = & kotlin.collections.MutableList"), DEBUG_INFO_SMARTCAST!>list[0] + val s: String = & kotlin.collections.MutableList"), DEBUG_INFO_SMARTCAST!>list[0] } \ No newline at end of file diff --git a/compiler/tests-spec/testData/diagnostics/notLinked/dfa/pos/9.kt b/compiler/tests-spec/testData/diagnostics/notLinked/dfa/pos/9.kt index b90f0e4d360..ba8e133e7e1 100644 --- a/compiler/tests-spec/testData/diagnostics/notLinked/dfa/pos/9.kt +++ b/compiler/tests-spec/testData/diagnostics/notLinked/dfa/pos/9.kt @@ -170,73 +170,73 @@ fun case_8(x: ClassWithThreeTypeParameters?> & ClassWithThreeTypeParameters?>?")!>x.funNullableT() ?> & ClassWithThreeTypeParameters?>?")!>x.funNullableAny() if (x.x != null) { - x.x - x.x.equals(null) - x.x.propT - x.x.propAny - x.x.propNullableT - x.x.propNullableAny - x.x.funT() - x.x.funAny() - x.x.funNullableT() - x.x.funNullableAny() + x.x + x.x.equals(null) + x.x.propT + x.x.propAny + x.x.propNullableT + x.x.propNullableAny + x.x.funT() + x.x.funAny() + x.x.funNullableT() + x.x.funNullableAny() } if (x.y != null) { - x.y - x.y.equals(null) - x.y.propT - x.y.propAny - x.y.propNullableT - x.y.propNullableAny - x.y.funT() - x.y.funAny() - x.y.funNullableT() - x.y.funNullableAny() + x.y + x.y.equals(null) + x.y.propT + x.y.propAny + x.y.propNullableT + x.y.propNullableAny + x.y.funT() + x.y.funAny() + x.y.funNullableT() + x.y.funNullableAny() } if (x.z != null) { - & ClassWithThreeTypeParameters?")!>x.z - & ClassWithThreeTypeParameters?")!>x.z.equals(null) - & ClassWithThreeTypeParameters?")!>x.z.propT - & ClassWithThreeTypeParameters?")!>x.z.propAny - & ClassWithThreeTypeParameters?")!>x.z.propNullableT - & ClassWithThreeTypeParameters?")!>x.z.propNullableAny - & ClassWithThreeTypeParameters?")!>x.z.funT() - & ClassWithThreeTypeParameters?")!>x.z.funAny() - & ClassWithThreeTypeParameters?")!>x.z.funNullableT() - & ClassWithThreeTypeParameters?")!>x.z.funNullableAny() - if (x.z.x != null) { - x.z.x - x.z.x.equals(null) - x.z.x.propT - x.z.x.propAny - x.z.x.propNullableT - x.z.x.propNullableAny - x.z.x.funT() - x.z.x.funAny() - x.z.x.funNullableT() - x.z.x.funNullableAny() + ?")!>x.z + ?")!>x.z.equals(null) + ?")!>x.z.propT + ?")!>x.z.propAny + ?")!>x.z.propNullableT + ?")!>x.z.propNullableAny + ?")!>x.z.funT() + ?")!>x.z.funAny() + ?")!>x.z.funNullableT() + ?")!>x.z.funNullableAny() + if (x.z.x != null) { + x.z.x + x.z.x.equals(null) + x.z.x.propT + x.z.x.propAny + x.z.x.propNullableT + x.z.x.propNullableAny + x.z.x.funT() + x.z.x.funAny() + x.z.x.funNullableT() + x.z.x.funNullableAny() } - if (x.z.y != null && x.z.z != null) { - x.z.y - x.z.z - x.z.y.equals(null) - x.z.y.propT - x.z.y.propAny - x.z.y.propNullableT - x.z.y.propNullableAny - x.z.y.funT() - x.z.y.funAny() - x.z.y.funNullableT() - x.z.y.funNullableAny() - x.z.z.equals(null) - x.z.z.propT - x.z.z.propAny - x.z.z.propNullableT - x.z.z.propNullableAny - x.z.z.funT() - x.z.z.funAny() - x.z.z.funNullableT() - x.z.z.funNullableAny() + if (x.z.y != null && x.z.z != null) { + x.z.y + x.z.z + x.z.y.equals(null) + x.z.y.propT + x.z.y.propAny + x.z.y.propNullableT + x.z.y.propNullableAny + x.z.y.funT() + x.z.y.funAny() + x.z.y.funNullableT() + x.z.y.funNullableAny() + x.z.z.equals(null) + x.z.z.propT + x.z.z.propAny + x.z.z.propNullableT + x.z.z.propNullableAny + x.z.z.funT() + x.z.z.funAny() + x.z.z.funNullableT() + x.z.z.funNullableAny() } } } @@ -428,16 +428,16 @@ fun case_17(a: Inv?>?>?>?>?>?) { */ fun case_18(a: Inv) { if (a.x != null) { - a.x - a.x.equals(null) - a.x.propT - a.x.propAny - a.x.propNullableT - a.x.propNullableAny - a.x.funT() - a.x.funAny() - a.x.funNullableT() - a.x.funNullableAny() + a.x + a.x.equals(null) + a.x.propT + a.x.propAny + a.x.propNullableT + a.x.propNullableAny + a.x.funT() + a.x.funAny() + a.x.funNullableT() + a.x.funNullableAny() } } @@ -460,16 +460,16 @@ fun case_19(a: Inv) { */ fun case_20(a: Inv) { if (a.x != null) { - a.x - a.x.equals(null) - a.x.propT - a.x.propAny - a.x.propNullableT - a.x.propNullableAny - a.x.funT() - a.x.funAny() - a.x.funNullableT() - a.x.funNullableAny() + a.x + a.x.equals(null) + a.x.propT + a.x.propAny + a.x.propNullableT + a.x.propNullableAny + a.x.funT() + a.x.funAny() + a.x.funNullableT() + a.x.funNullableAny() } } @@ -480,16 +480,16 @@ fun case_20(a: Inv) { */ fun case_21(a: Out<out Int?>) { if (a.x != null) { - a.x - a.x.equals(null) - a.x.propT - a.x.propAny - a.x.propNullableT - a.x.propNullableAny - a.x.funT() - a.x.funAny() - a.x.funNullableT() - a.x.funNullableAny() + a.x + a.x.equals(null) + a.x.propT + a.x.propAny + a.x.propNullableT + a.x.propNullableAny + a.x.funT() + a.x.funAny() + a.x.funNullableT() + a.x.funNullableAny() } } @@ -512,16 +512,16 @@ fun case_22(a: Out<out Nothing?>) { */ fun case_23(a: Out<out Any?>) { if (a.x != null) { - a.x - a.x.equals(null) - a.x.propT - a.x.propAny - a.x.propNullableT - a.x.propNullableAny - a.x.funT() - a.x.funAny() - a.x.funNullableT() - a.x.funNullableAny() + a.x + a.x.equals(null) + a.x.propT + a.x.propAny + a.x.propNullableT + a.x.propNullableAny + a.x.funT() + a.x.funAny() + a.x.funNullableT() + a.x.funNullableAny() } } @@ -572,16 +572,16 @@ fun case_26(a: Out) { */ fun case_27(a: Inv) { if (a.x != null) { - a.x - a.x.equals(null) - a.x.propT - a.x.propAny - a.x.propNullableT - a.x.propNullableAny - a.x.funT() - a.x.funAny() - a.x.funNullableT() - a.x.funNullableAny() + a.x + a.x.equals(null) + a.x.propT + a.x.propAny + a.x.propNullableT + a.x.propNullableAny + a.x.funT() + a.x.funAny() + a.x.funNullableT() + a.x.funNullableAny() } } @@ -592,16 +592,16 @@ fun case_27(a: Inv) { */ fun case_28(a: Inv) { if (a.x != null) { - a.x - a.x.equals(null) - a.x.propT - a.x.propAny - a.x.propNullableT - a.x.propNullableAny - a.x.funT() - a.x.funAny() - a.x.funNullableT() - a.x.funNullableAny() + a.x + a.x.equals(null) + a.x.propT + a.x.propAny + a.x.propNullableT + a.x.propNullableAny + a.x.funT() + a.x.funAny() + a.x.funNullableT() + a.x.funNullableAny() } } @@ -612,16 +612,16 @@ fun case_28(a: Inv) { */ fun case_29(a: Inv) { if (a.x != null) { - a.x - a.x.equals(null) - a.x.propT - a.x.propAny - a.x.propNullableT - a.x.propNullableAny - a.x.funT() - a.x.funAny() - a.x.funNullableT() - a.x.funNullableAny() + a.x + a.x.equals(null) + a.x.propT + a.x.propAny + a.x.propNullableT + a.x.propNullableAny + a.x.funT() + a.x.funAny() + a.x.funNullableT() + a.x.funNullableAny() } }