Skip to content

Conversation

anba
Copy link
Contributor

@anba anba commented Jun 11, 2025

The function name must be explicitly specified for methods whose property key is a Symbol value.

…StringTag] accessors

The function name must be explicitly specified for methods whose
property key is a Symbol value.
@anba
Copy link
Contributor Author

anba commented Jun 11, 2025

JSC doesn't assign the expected name:

>>> Object.getOwnPropertyDescriptor(Iterator.prototype, Symbol.toStringTag).get.name
"get "
>>> Object.getOwnPropertyDescriptor(Iterator.prototype, Symbol.toStringTag).set.name
"set "

@ljharb
Copy link
Member

ljharb commented Jun 11, 2025

oof. does test262 not have tests covering the name?

@anba
Copy link
Contributor Author

anba commented Jun 11, 2025

I don't think there's test262 coverage for this. Or at least I don't see any coverage in https://github.com/tc39/test262/tree/main/test/built-ins/Iterator/prototype/Symbol.toStringTag. (I'm currently exploring if it's possible to generate tests for "name" and "length" properties of built-in functions, that's why I found this bug.)

@michaelficarra michaelficarra added normative change Affects behavior required to correctly evaluate some ECMAScript source text needs test262 tests The proposal should specify how to test an implementation. Ideally via github.com/tc39/test262 needs consensus This needs committee consensus before it can be eligible to be merged. labels Jun 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs consensus This needs committee consensus before it can be eligible to be merged. needs test262 tests The proposal should specify how to test an implementation. Ideally via github.com/tc39/test262 normative change Affects behavior required to correctly evaluate some ECMAScript source text

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants