[Test] Add regression tests for issues which are fixed in K2
Related issues: KT-10879, KT-18055, KT-20617, KT-23873 KT-25668, KT-31191, KT-33108, KT-41013 KT-51827, KT-53886, KT-56624, KT-58447 KT-58458, KT-58751, KT-58814, KT-60597 KT-62806, KT-63258, KT-63444, KT-65101 KT-65408, KT-65844, KT-66186 ^KT-65926 Fixed
This commit is contained in:
committed by
Space Team
parent
b875ae774e
commit
4b5eac7816
+20
@@ -0,0 +1,20 @@
|
||||
// ISSUE: KT-51827
|
||||
abstract class A {
|
||||
abstract protected val a: Any?
|
||||
|
||||
open class Nested(override val a: String) : A() {
|
||||
class B {
|
||||
fun f(other: A) {
|
||||
other.a
|
||||
if (other is Nested) {
|
||||
other.a.length
|
||||
}
|
||||
if (other is C) {
|
||||
other.a
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class C(override val a: String): Nested(a)
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
// ISSUE: KT-51827
|
||||
abstract class A {
|
||||
abstract protected val a: Any?
|
||||
|
||||
open class Nested(override val a: String) : A() {
|
||||
class B {
|
||||
fun f(other: A) {
|
||||
other.a
|
||||
if (other is Nested) {
|
||||
<!DEBUG_INFO_SMARTCAST!>other<!>.a.length
|
||||
}
|
||||
if (other is C) {
|
||||
<!DEBUG_INFO_SMARTCAST!>other<!>.<!INVISIBLE_MEMBER!>a<!>
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class C(override val a: String): Nested(a)
|
||||
}
|
||||
Reference in New Issue
Block a user