mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[kotlin] Filter out parent's slices
#KTIJ-26856 Fixed GitOrigin-RevId: b93955bd9d0bda53814af6d5f44e86af6226c1be
This commit is contained in:
committed by
intellij-monorepo-bot
parent
98d798dbf5
commit
e4668e8818
+5
-1
@@ -471,7 +471,11 @@ private class StackedCompositeBindingContextTrace(
|
||||
}
|
||||
|
||||
override fun <K : Any?, V : Any?> getSliceContents(slice: ReadOnlySlice<K, V>): ImmutableMap<K, V> {
|
||||
return ImmutableMap.copyOf(parentContext.getSliceContents(slice) + map.getSliceContents(slice))
|
||||
val parentSliceContents = parentContext.getSliceContents(slice).filter {
|
||||
(it.key as? PsiElement)?.parentsWithSelf?.none { e -> e == element } != false
|
||||
}
|
||||
val mapSliceContents = map.getSliceContents(slice)
|
||||
return ImmutableMap.copyOf(parentSliceContents + mapSliceContents)
|
||||
}
|
||||
|
||||
override fun addOwnDataTo(trace: BindingTrace, commitDiagnostics: Boolean) = throw UnsupportedOperationException()
|
||||
|
||||
Reference in New Issue
Block a user