FIR: report SMARTCAST_IMPOSSIBLE on inherited alien properties [KT-48101]
This commit is contained in:
committed by
TeamCityServer
parent
0a6e51e47f
commit
fb1eac0985
+25
@@ -0,0 +1,25 @@
|
||||
// MODULE: m1
|
||||
// FILE: A.kt
|
||||
|
||||
open class Base(val x: Any)
|
||||
open class Generic<T>(val y: T)
|
||||
|
||||
// MODULE: m2(m1)
|
||||
// FILE: B.kt
|
||||
|
||||
class Derived : Base("123") {
|
||||
fun foo() {
|
||||
if (x is String) {
|
||||
<!DEBUG_INFO_SMARTCAST!>x<!>.length // impossible since `x` is in another module. FE1.0 allows this due to KT-47225
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class MyGeneric : Generic<Number>(42) {
|
||||
private fun baz(arg: Int) {}
|
||||
fun bar() {
|
||||
if (y is Int) {
|
||||
baz(<!DEBUG_INFO_SMARTCAST!>y<!>) // impossible since `y` is in another module. FE1.0 allows this due to KT-47225
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user