Debugger: Run control flow on code fragments (KT-30120)
This commit is contained in:
@@ -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 }
|
||||
Reference in New Issue
Block a user