FE: add one more test related to KT-56511 with the relevant feature ON
This commit is contained in:
committed by
Space Team
parent
41c868445c
commit
e8232a7572
Vendored
+25
@@ -0,0 +1,25 @@
|
||||
// !LANGUAGE: -ProhibitSmartcastsOnPropertyFromAlienBaseClassInheritedInInvisibleClass
|
||||
// RENDER_DIAGNOSTICS_FULL_TEXT
|
||||
// MODULE: m1
|
||||
// FILE: A.kt
|
||||
|
||||
open class Base(val x: Any)
|
||||
|
||||
// MODULE: m2(m1)
|
||||
// FILE: B.kt
|
||||
|
||||
private class Derived : Base("123") {
|
||||
fun foo() {
|
||||
if (x is String) {
|
||||
<!SMARTCAST_IMPOSSIBLE!>x<!>.length
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
internal class Internal : Base("456")
|
||||
|
||||
internal fun bar(i: Internal) {
|
||||
if (i.x is String) {
|
||||
<!SMARTCAST_IMPOSSIBLE!>i.x<!>.length
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user