// Comparing an `Any` against a concrete value (a MIXED `Any == `, in // either operand order) compares the boxed value words — the same value-identity // the both-`Any` comparison uses. Boxing the concrete side first keeps the // operands shape-compatible. // // Regression (issue 0199): a mixed `Any == ` fell through to a plain // `icmp` on a 16-byte `{tag, value}` aggregate vs a scalar, aborting the LLVM // verifier ("Both operands to ICmp are not of the same type"). The both-`Any` // form already worked; this extends it to one-sided `Any` comparisons. #import "modules/std.sx"; main :: () -> i64 { x : Any = 5; print("{}\n", x == 5); // true print("{}\n", x == 6); // false print("{}\n", x != 6); // true print("{}\n", 5 == x); // true (concrete on the left) b : Any = true; print("{}\n", b == true); // true print("{}\n", b == false); // false y : Any = 5; print("{}\n", x == y); // true (both Any — unchanged) return 0; }