Breaking change. Map operations revisited.
This commit is contained in:
@@ -61,7 +61,7 @@ public class PseudocodeVariableDataCollector(
|
||||
|
||||
// Variables declared in an inner (deeper) scope can't be accessed from an outer scope.
|
||||
// Thus they can be filtered out upon leaving the inner scope.
|
||||
return data.filterKeys { variable ->
|
||||
return data.filterKeys_tmp { variable ->
|
||||
val lexicalScope = lexicalScopeVariableInfo.declaredIn[variable]
|
||||
// '-1' for variables declared outside this pseudocode
|
||||
val depth = lexicalScope?.depth ?: -1
|
||||
|
||||
@@ -19,7 +19,8 @@ package org.jetbrains.jet.utils.addToStdlib
|
||||
import java.util.HashMap
|
||||
import java.util.Collections
|
||||
|
||||
fun <K, V> Map<K, V>.filterKeys(predicate: (K)->Boolean): Map<K, V> {
|
||||
deprecated("Replace with filterKeys when bootstrapped")
|
||||
fun <K, V> Map<K, V>.filterKeys_tmp(predicate: (K)->Boolean): Map<K, V> {
|
||||
val result = HashMap<K, V>()
|
||||
for ((k, v) in this) {
|
||||
if (predicate(k)) {
|
||||
|
||||
Reference in New Issue
Block a user