Fix copying occurrences from the store view
This commit is contained in:
parent
cae150819f
commit
c687908e1e
|
|
@ -97,11 +97,11 @@ class Store : LogicalObserver, OccurrenceIndex {
|
|||
var v2o = Maps.of<Any, IdHashSet<ConstraintOccurrence>>()
|
||||
|
||||
copyFrom.allOccurrences().forEach { occ ->
|
||||
occ.arguments().forEach { a ->
|
||||
when (a) {
|
||||
is Logical<*> -> l2o = l2o.put(IdWrapper(a), l2o[IdWrapper(a)]?.add(occ) ?: singletonSet(occ))
|
||||
is Term -> t2o = t2o.put(a, occ)
|
||||
is Any -> v2o = v2o.put(a, v2o[a]?.add(occ) ?: singletonSet(occ))
|
||||
occ.arguments().forEach { arg ->
|
||||
when (arg) {
|
||||
is Logical<*> -> l2o = l2o.put(IdWrapper(arg.findRoot()), l2o[IdWrapper(arg.findRoot())]?.add(occ) ?: singletonSet(occ))
|
||||
is Term -> t2o = t2o.put(arg.withConstraint(occ.constraint()), occ)
|
||||
is Any -> v2o = v2o.put(arg, v2o[arg]?.add(occ) ?: singletonSet(occ))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue