Skip to content

Commit

Permalink
fix meet of intervals when they do not overlap
Browse files Browse the repository at this point in the history
  • Loading branch information
CodingDepot committed Oct 30, 2024
1 parent d9cb986 commit b61a970
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,8 @@ sealed class LatticeInterval : Comparable<LatticeInterval> {
return when {

Check warning on line 215 in cpg-analysis/src/main/kotlin/de/fraunhofer/aisec/cpg/analysis/abstracteval/LatticeInterval.kt

View check run for this annotation

Codecov / codecov/patch

cpg-analysis/src/main/kotlin/de/fraunhofer/aisec/cpg/analysis/abstracteval/LatticeInterval.kt#L215

Added line #L215 was not covered by tests
this is BOTTOM -> other
other is BOTTOM -> this
// Check if the overlap at all
this.compareTo(other) != 0 -> BOTTOM
this is Bounded && other is Bounded -> {
val newLower = max(this.lower, other.lower)
val newUpper = min(this.upper, other.upper)
Expand Down

0 comments on commit b61a970

Please sign in to comment.