Files
sausage/userland/qjs/source/tests/bug1565.js
T
surma d44f1d9677 Build separate native and WASI pipelines with shared multicall names
Checkpoint before integration and package validation.

Assisted-by: SurmAgent:unknown [read] [edit] [bash]
2026-11-12 09:36:27 +00:00

17 lines
649 B
JavaScript

new Set([{}]).union(new Set([9])); // leaked the {} element
new Set([{}]).symmetricDifference(new Set([9])); // same
// symmetricDifference: element only reachable via the setlike iterator
new Set([1]).symmetricDifference(new Set([{}]));
// intersection, |this| larger than the argument: iterates the argument's keys
var o1 = {};
new Set([o1, 1, 2]).intersection(new Set([o1]));
// intersection, |this| not larger: iterates |this| and probes with .has()
var o2 = {};
new Set([o2]).intersection(new Set([o2, 1, 2]));
// difference, |this| not larger: iterates |this| and keeps the misses
new Set([{}]).difference(new Set([9]));