Analyze inlined declarations in bytecode toolwindow

This commit is contained in:
Michael Bogdanov
2015-02-04 16:16:36 +03:00
parent 5c9554e703
commit 758c147835
2 changed files with 51 additions and 9 deletions
@@ -45,11 +45,10 @@ public class CompositeBindingContext private (
}
override fun <K, V> getSliceContents(slice: ReadOnlySlice<K, V>): ImmutableMap<K, V> {
val builder = ImmutableMap.builder<K, V>()!!
for (delegate in delegates) {
builder.putAll(delegate.getSliceContents(slice))
}
return builder.build()!!
//we need intermediate map cause ImmutableMap doesn't support same entries obtained from different slices
var map = hashMapOf<K, V>()
delegates.forEach { map.putAll(it.getSliceContents(slice)) }
return ImmutableMap.builder<K, V>().putAll(map).build()
}
override fun getDiagnostics(): Diagnostics {