Skip to content

Conversation

jugglinmike
Copy link
Contributor

Resolves gh-2967. I reviewed the project's coverage for the rest of this algorithm, and it looks okay to me.

shvaikalesh
shvaikalesh previously approved these changes Apr 18, 2021
is stringKey.
[...]
6. Return newSymbol.
features: [Symbol]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
features: [Symbol]
features: [Symbol, Symbol.prototype.description]

Copy link
Member

@leobalter leobalter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jugglinmike The test looks good and it is just missing the feature tag as pointed out by @shvaikalesh.

A small nit pick, thou. I believe this test file should be at test/built-ins/Symbol/prototype/description and that folder might be missing other tests to capture description from ToString coerced values.

The decision on the file location might be subjective and it's ok to not go through that path.

@jugglinmike
Copy link
Contributor Author

Thanks for reviewing this!

just missing the feature tag as pointed out by @shvaikalesh.

All set

I believe this test file should be at test/built-ins/Symbol/prototype/description

Yeah, the test necessarily uses two different APIs, making the placement a little ambiguous. I chose the for/ directory because we're specifically interested in how the [[Description]] internal slot is defined, not how the [[Description]] internal slot is referenced (the existing tests verify the latter).

that folder might be missing other tests to capture description from ToString coerced values.

I can help with that. I don't see any string coercion in that algorithm, though--could you say more about what you have in mind?

@rwaldron
Copy link
Contributor

rwaldron commented May 4, 2021

@leobalter are you good with @jugglinmike's response?

@leobalter
Copy link
Member

Yes, I just don't have the bandwidth to expand my thoughts on the ToString coercion, but hopefully I can explore it in a near future.

@jugglinmike
Copy link
Contributor Author

Thanks, @leobalter! Would you mind formally registering your approval using the GitHub.com UI? At some point, this became mandatory for Test262 pull requests.

@jugglinmike jugglinmike merged commit 219ad6f into tc39:main May 14, 2021
@jugglinmike jugglinmike deleted the symbol-for-description branch May 14, 2021 01:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

test Symbol.for('bar').toString()
4 participants