Commit d732f746 authored by Mattias Ulbrich's avatar Mattias Ulbrich
Browse files

Merge branch 'bubelFixIntersectTermBuilder' into 'master'

[Fix] Intersection construction of location sets in TemrBuilder

See merge request key/key!361
parents 93c17798 cf3558c4
......@@ -1395,13 +1395,17 @@ public class TermBuilder {
final LocSetLDT ldt = services.getTypeConverter().getLocSetLDT();
if (s1.op() == ldt.getEmpty() || s2.op() == ldt.getEmpty()) {
return empty();
} else if (s1.op() == ldt.getAllLocs()) {
return s2;
} else if (s2.op() == ldt.getAllLocs()) {
return s1;
} else {
return func(ldt.getIntersect(), s1, s2);
}
}
public Term intersect(Term... subTerms) {
Term result = empty();
Term result = allLocs();
for (Term sub : subTerms) {
result = intersect(result, sub);
}
......@@ -1409,7 +1413,7 @@ public class TermBuilder {
}
public Term intersect(Iterable<Term> subTerms) {
Term result = empty();
Term result = allLocs();
for (Term sub : subTerms) {
result = intersect(result, sub);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment