show detailed smart cast info in "Show expression type" (KT-8803)

This commit is contained in:
Dmitry Jemerov
2016-08-26 16:34:25 +02:00
parent 2141cd268c
commit 256fd04e95
5 changed files with 51 additions and 5 deletions
+1 -1
View File
@@ -4,5 +4,5 @@ fun foo(x: Any) {
}
}
// TYPE: x -> <html>String (smart cast)</html>
// TYPE: x -> <html>String (smart cast from Any)</html>
// TYPE: x.length -> <html>Int</html>
@@ -0,0 +1,13 @@
interface A
interface B : A
fun fn(value: Any) {
if (value is B) {
if (<caret>value is A) { // here
}
}
}
// TYPE: value -> <html>B (smart cast from Any)</html>
// TYPE: value is A -> <html>Boolean</html>
@@ -0,0 +1,14 @@
interface A
interface B
fun fn(value: Any) {
if (value is B) {
if (value is A) {
println(valu<caret>e)
}
}
}
// TYPE: value -> <html>A & B (smart cast from Any)</html>
// TYPE: println(value) -> <html>Unit</html>