More tests for smart casts

This commit is contained in:
Valentin Kipyatkov
2015-07-17 15:22:46 +03:00
parent 23cfe88b71
commit 0ac990e1a0
7 changed files with 66 additions and 0 deletions
@@ -0,0 +1,10 @@
import java.io.File
fun foo(o: Any) {
if (o is File) {
o.<caret>
}
}
// EXIST_JAVA_ONLY: { lookupString: "absolutePath", itemText: "absolutePath", tailText: " (from getAbsolutePath())", typeText: "String!" }
// ABSENT: getAbsolutePath
@@ -0,0 +1,10 @@
import java.io.File
fun Any.foo() {
if (this is File) {
<caret>
}
}
// EXIST_JAVA_ONLY: { lookupString: "absolutePath", itemText: "absolutePath", tailText: " (from getAbsolutePath())", typeText: "String!" }
// ABSENT: getAbsolutePath