test for handling smart casts in "show expression type"
#KT-10588 Fixed
This commit is contained in:
@@ -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>
|
||||
Reference in New Issue
Block a user