mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 03:17:35 +00:00
LibJS: Implement Sets using Maps
This implements ordered sets using Maps with a sentinel value, and includes some extra set tests. Fixes #11004. Co-Authored-By: davidot <davidot@serenityos.org>
This commit is contained in:
parent
4a73ec07c5
commit
3bfcd7b52d
8 changed files with 133 additions and 21 deletions
|
@ -18,7 +18,7 @@ SetIterator::SetIterator(Set& set, Object::PropertyKind iteration_kind, Object&
|
|||
: Object(prototype)
|
||||
, m_set(set)
|
||||
, m_iteration_kind(iteration_kind)
|
||||
, m_iterator(set.values().begin())
|
||||
, m_iterator(static_cast<Set const&>(set).begin())
|
||||
{
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue