-
Notifications
You must be signed in to change notification settings - Fork 472
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Permit Symbol as WeakMap key and WeakSet entry #2850
Comments
rwaldron
added a commit
that referenced
this issue
Nov 2, 2020
rwaldron
added a commit
that referenced
this issue
Nov 4, 2020
rwaldron
added a commit
that referenced
this issue
Dec 2, 2021
@rwaldron Mind if I take on updating this to the version of the proposal that eventually reached stage 3? |
ptomato
added a commit
to ptomato/test262
that referenced
this issue
Sep 29, 2022
WeakMap, WeakSet, WeakRef, and FinalizationRegistry all had tests verifying what would happen if they were called with a value that wasn't allowed as a weak value: before this proposal, that was a non-Object. Now, allowed weak values are Objects, well-known Symbols, and unregistered Symbols. That leaves registered Symbols that are still not allowed as weak values. This commit updates those tests to use a registered Symbol instead of an unregistered Symbol; they should still pass, regardless of whether the implementation has implemented symbols-as-weakmap-keys yet. The tests are renamed as appropriate. Also updates the frontmatter to the most current spec text, including the CanBeHeldWeakly abstract operation. See: tc39#2850
ptomato
added a commit
to ptomato/test262
that referenced
this issue
Sep 29, 2022
There are many existing tests for WeakMap, WeakSet, WeakRef, and FinalizationRegistry using Objects as weak values. For symbols-as-weakmap- keys, we'll want to write tests that parallel these for Symbol keys. Change the descriptions and filenames of these tests to describe their new scope of only Object weak values. Update the front matter of these tests while we're at it, to reflect the changes to the spec text that the symbols-as-weakmap-keys brings in. (In some cases, remove irrelevant bits of the front matter.) See: tc39#2850
ptomato
added a commit
to ptomato/test262
that referenced
this issue
Sep 29, 2022
ptomato
added a commit
to ptomato/test262
that referenced
this issue
Sep 29, 2022
This adds tests to WeakMap, WeakSet, WeakRef, and FinalizationRegistry for Symbols as weakly-held values. Regular symbols and well-known symbols are both tested. These tests correspond to existing tests for Objects as weakly-held values, but are put in separate files so that they can be filtered out with the "symbols-as-weakmap-keys" feature flag. Registered symbols are not allowed; this is already tested in the "cannot- be-held-weakly" tests. See: tc39#2850
ptomato
added a commit
to ptomato/test262
that referenced
this issue
Oct 11, 2022
WeakMap, WeakSet, WeakRef, and FinalizationRegistry all had tests verifying what would happen if they were called with a value that wasn't allowed as a weak value: before this proposal, that was a non-Object. Now, allowed weak values are Objects, well-known Symbols, and unregistered Symbols. That leaves registered Symbols that are still not allowed as weak values. This commit updates those tests to use a registered Symbol instead of an unregistered Symbol; they should still pass, regardless of whether the implementation has implemented symbols-as-weakmap-keys yet. The tests are renamed as appropriate. Also updates the frontmatter to the most current spec text, including the CanBeHeldWeakly abstract operation. See: tc39#2850
ptomato
added a commit
to ptomato/test262
that referenced
this issue
Oct 11, 2022
There are many existing tests for WeakMap, WeakSet, WeakRef, and FinalizationRegistry using Objects as weak values. For symbols-as-weakmap- keys, we'll want to write tests that parallel these for Symbol keys. Change the descriptions and filenames of these tests to describe their new scope of only Object weak values. Update the front matter of these tests while we're at it, to reflect the changes to the spec text that the symbols-as-weakmap-keys brings in. (In some cases, remove irrelevant bits of the front matter.) See: tc39#2850
ptomato
added a commit
to ptomato/test262
that referenced
this issue
Oct 11, 2022
ptomato
added a commit
to ptomato/test262
that referenced
this issue
Oct 11, 2022
This adds tests to WeakMap, WeakSet, WeakRef, and FinalizationRegistry for Symbols as weakly-held values. Regular symbols and well-known symbols are both tested. These tests correspond to existing tests for Objects as weakly-held values, but are put in separate files so that they can be filtered out with the "symbols-as-weakmap-keys" feature flag. Registered symbols are not allowed; this is already tested in the "cannot- be-held-weakly" tests. See: tc39#2850
Ms2ger
pushed a commit
to ptomato/test262
that referenced
this issue
Oct 12, 2022
WeakMap, WeakSet, WeakRef, and FinalizationRegistry all had tests verifying what would happen if they were called with a value that wasn't allowed as a weak value: before this proposal, that was a non-Object. Now, allowed weak values are Objects, well-known Symbols, and unregistered Symbols. That leaves registered Symbols that are still not allowed as weak values. This commit updates those tests to use a registered Symbol instead of an unregistered Symbol; they should still pass, regardless of whether the implementation has implemented symbols-as-weakmap-keys yet. The tests are renamed as appropriate. Also updates the frontmatter to the most current spec text, including the CanBeHeldWeakly abstract operation. See: tc39#2850
Ms2ger
pushed a commit
to ptomato/test262
that referenced
this issue
Oct 12, 2022
There are many existing tests for WeakMap, WeakSet, WeakRef, and FinalizationRegistry using Objects as weak values. For symbols-as-weakmap- keys, we'll want to write tests that parallel these for Symbol keys. Change the descriptions and filenames of these tests to describe their new scope of only Object weak values. Update the front matter of these tests while we're at it, to reflect the changes to the spec text that the symbols-as-weakmap-keys brings in. (In some cases, remove irrelevant bits of the front matter.) See: tc39#2850
Ms2ger
pushed a commit
to ptomato/test262
that referenced
this issue
Oct 12, 2022
Ms2ger
pushed a commit
to ptomato/test262
that referenced
this issue
Oct 12, 2022
This adds tests to WeakMap, WeakSet, WeakRef, and FinalizationRegistry for Symbols as weakly-held values. Regular symbols and well-known symbols are both tested. These tests correspond to existing tests for Objects as weakly-held values, but are put in separate files so that they can be filtered out with the "symbols-as-weakmap-keys" feature flag. Registered symbols are not allowed; this is already tested in the "cannot- be-held-weakly" tests. See: tc39#2850
Ms2ger
pushed a commit
that referenced
this issue
Oct 12, 2022
WeakMap, WeakSet, WeakRef, and FinalizationRegistry all had tests verifying what would happen if they were called with a value that wasn't allowed as a weak value: before this proposal, that was a non-Object. Now, allowed weak values are Objects, well-known Symbols, and unregistered Symbols. That leaves registered Symbols that are still not allowed as weak values. This commit updates those tests to use a registered Symbol instead of an unregistered Symbol; they should still pass, regardless of whether the implementation has implemented symbols-as-weakmap-keys yet. The tests are renamed as appropriate. Also updates the frontmatter to the most current spec text, including the CanBeHeldWeakly abstract operation. See: #2850
Ms2ger
pushed a commit
that referenced
this issue
Oct 12, 2022
There are many existing tests for WeakMap, WeakSet, WeakRef, and FinalizationRegistry using Objects as weak values. For symbols-as-weakmap- keys, we'll want to write tests that parallel these for Symbol keys. Change the descriptions and filenames of these tests to describe their new scope of only Object weak values. Update the front matter of these tests while we're at it, to reflect the changes to the spec text that the symbols-as-weakmap-keys brings in. (In some cases, remove irrelevant bits of the front matter.) See: #2850
Ms2ger
pushed a commit
that referenced
this issue
Oct 12, 2022
Ms2ger
pushed a commit
that referenced
this issue
Oct 12, 2022
This adds tests to WeakMap, WeakSet, WeakRef, and FinalizationRegistry for Symbols as weakly-held values. Regular symbols and well-known symbols are both tested. These tests correspond to existing tests for Objects as weakly-held values, but are put in separate files so that they can be filtered out with the "symbols-as-weakmap-keys" feature flag. Registered symbols are not allowed; this is already tested in the "cannot- be-held-weakly" tests. See: #2850
catamorphism
pushed a commit
to nicolo-ribaudo/test262
that referenced
this issue
Oct 18, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
tc39/ecma262#2038
The text was updated successfully, but these errors were encountered: