(and
(apply #'comp-cstr-intersection lval operands))
(not
- (comp-cstr-negation lval (car operands)))))
+ ;; Prevent double negation!
+ (unless (comp-cstr-neg (car operands))
+ (comp-cstr-negation lval (car operands))))))
(`(setimm ,lval ,v)
(setf (comp-mvar-value lval) v))
(`(phi ,lval . ,rest)
(1 " ➊") (2 " ➋") (3 " ➌") (4 " ➍") (5 " ➎") (6 " ➏")
(7 " ➐") (8 " ➑") (9 " ➒") (10 " ➓") (_ "")))
+(defun comp-test-assume-double-neg-f (collection value)
+ ;; Reduced from `auth-source-search-collection'.
+ (when (atom collection)
+ (setq collection (list collection)))
+ (or (eq value t)
+ ;; value is (not (member t))
+ (eq collection value)
+ ;; collection is t, not (member t)!
+ (member value collection)))
+
\f
;;;;;;;;;;;;;;;;;;;;
;; Tromey's tests ;;
<https://lists.gnu.org/archive/html/bug-gnu-emacs/2020-12/msg01771.html>"
(should (string= " ➊" (comp-test-45342-f 1))))
+(comp-deftest assume-double-neg ()
+ "In fwprop assumtions (not (not (member x))) /= (member x)."
+ (should-not (comp-test-assume-double-neg-f "bar" "foo")))
+
(defvar comp-test-primitive-advice)
(comp-deftest primitive-advice ()
"Test effectiveness of primitive advicing."