Fix "if to safe access" false positive for check on incorrect type
So #KT-21881 Fixed
This commit is contained in:
committed by
Mikhail Glukhikh
parent
5798595206
commit
fad7818bf0
+17
@@ -0,0 +1,17 @@
|
||||
// PROBLEM: none
|
||||
// WITH_RUNTIME
|
||||
class Foo
|
||||
|
||||
class Test {
|
||||
fun foo(): Any = ""
|
||||
|
||||
fun bar() {}
|
||||
|
||||
fun test(a: Any) {
|
||||
foo().apply {
|
||||
<caret>if (this is Foo) {
|
||||
bar()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user