test for handling smart casts in "show expression type"

#KT-10588 Fixed
This commit is contained in:
Dmitry Jemerov
2016-08-25 21:22:25 +02:00
parent 032d50bbbf
commit 4346afa19e
3 changed files with 31 additions and 22 deletions
+9
View File
@@ -0,0 +1,9 @@
fun foo(x: Any) {
if (x is String) {
<caret>x.length
}
}
// TYPE: if (x is String) { x.length } -> <html>kotlin.Unit</html>
// TYPE: x -> <html>kotlin.String (smart cast)</html>
// TYPE: x.length -> <html>kotlin.Int</html>