Skip to content

Commit 7ce170a

Browse files
committed
Add comment
1 parent 56bd4b5 commit 7ce170a

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

usvm-ts/src/main/kotlin/org/usvm/machine/operator/TsBinaryOperator.kt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -636,6 +636,10 @@ sealed interface TsBinaryOperator {
636636
check(!lhsValue.isFakeObject()) { "Nested fake objects are not supported" }
637637
check(!rhsValue.isFakeObject()) { "Nested fake objects are not supported" }
638638

639+
// Note: this is the case 'ref === ref',
640+
// which should be `true` only if both have the same reference.
641+
// It is not correct to delegate to `Eq.resolve` in this case,
642+
// since `==` treats `null == undefined`, while `null !== undefined`.
639643
if (lhsValue.sort == addressSort && rhsValue.sort == addressSort) {
640644
val left = lhsValue.asExpr(addressSort)
641645
val right = rhsValue.asExpr(addressSort)

0 commit comments

Comments
 (0)