Support for 'as' and temporary support for 'is'
This commit is contained in:
+9
@@ -198,6 +198,15 @@ private class Processor(
|
|||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
is KtIsExpression -> {
|
||||||
|
return true //TODO!
|
||||||
|
}
|
||||||
|
|
||||||
|
is KtBinaryExpressionWithTypeRHS -> {
|
||||||
|
processSuspiciousExpression(typeRefParent)
|
||||||
|
return true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -20,3 +20,14 @@ fun g() = A()
|
|||||||
fun h() = g()
|
fun h() = g()
|
||||||
|
|
||||||
fun listOfA() = listOf<A>(A(1, "", ""))
|
fun listOfA() = listOf<A>(A(1, "", ""))
|
||||||
|
|
||||||
|
fun x(o: Any) {
|
||||||
|
if (o is A) {
|
||||||
|
val (x, y) = o
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fun y(o: Any) {
|
||||||
|
val list = o as List<A>
|
||||||
|
val (x, y) = list[0]
|
||||||
|
}
|
||||||
|
|||||||
@@ -5,6 +5,8 @@
|
|||||||
[dataClass.2.kt] Value read 11 val (x3, y3, z3) = h()
|
[dataClass.2.kt] Value read 11 val (x3, y3, z3) = h()
|
||||||
[dataClass.2.kt] Value read 13 val (x4, y4, z4) = listOfA()[0]
|
[dataClass.2.kt] Value read 13 val (x4, y4, z4) = listOfA()[0]
|
||||||
[dataClass.2.kt] Value read 15 val (x5, y5, z5) = javaClass.getA()[0]
|
[dataClass.2.kt] Value read 15 val (x5, y5, z5) = javaClass.getA()[0]
|
||||||
|
[dataClass.2.kt] Value read 26 val (x, y) = o
|
||||||
|
[dataClass.2.kt] Value read 32 val (x, y) = list[0]
|
||||||
[dataClass.2.kt] Value read 5 a.n
|
[dataClass.2.kt] Value read 5 a.n
|
||||||
[dataClass.2.kt] Value read 8 val (x, y, z) = a
|
[dataClass.2.kt] Value read 8 val (x, y, z) = a
|
||||||
[dataClass.2.kt] Value read 9 val (x1, y1, z1) = f()
|
[dataClass.2.kt] Value read 9 val (x1, y1, z1) = f()
|
||||||
Reference in New Issue
Block a user