Debugger: Run control flow on code fragments (KT-30120)

This commit is contained in:
Yan Zhulanow
2019-04-26 02:02:39 +03:00
parent 35c63db9bc
commit bfb1d53ddf
7 changed files with 69 additions and 22 deletions
+16
View File
@@ -0,0 +1,16 @@
// INSPECTION_CLASS: org.jetbrains.kotlin.idea.inspections.UnusedEqualsInspection
fun main() {
val list = java.util.ArrayList<Int>()
<caret>val x = 0
}
fun <T> Collection<T>.isAny(predicate: (T) -> Boolean): Boolean {
for (item in this) {
if (predicate(item)) {
return true
}
}
return false
}
@@ -0,0 +1 @@
list.isAny { it == 2 }