show detailed smart cast info in "Show expression type" (KT-8803)
This commit is contained in:
+1
-1
@@ -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>
|
||||
Reference in New Issue
Block a user