Files
kotlin-fork/compiler/testData/diagnostics/tests/visibility/invisiblePrivateThroughSubClassDoubleSmartCast.kt
T
2022-06-01 16:02:30 +00:00

26 lines
538 B
Kotlin
Vendored

// SKIP_TXT
// ISSUE: KT-52543
abstract class A {
fun foo(a: Any) {
if (a is A) {
<!DEBUG_INFO_SMARTCAST!>a<!>.prv()
if (a is B) {
<!DEBUG_INFO_SMARTCAST!>a<!>.prv()
}
}
if (a is B) {
<!DEBUG_INFO_SMARTCAST!>a<!>.<!INVISIBLE_MEMBER!>prv<!>()
if (<!USELESS_IS_CHECK!>a is A<!>) {
<!DEBUG_INFO_SMARTCAST!>a<!>.<!INVISIBLE_MEMBER!>prv<!>()
}
}
}
private fun prv() {}
}
open class B : A()