Fix "if to safe access" false positive for check on incorrect type

So #KT-21881 Fixed
This commit is contained in:
Toshiaki Kameyama
2018-01-12 11:46:43 +03:00
committed by Mikhail Glukhikh
parent 5798595206
commit fad7818bf0
4 changed files with 29 additions and 3 deletions
@@ -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()
}
}
}
}