Skip to content

fix(helpers): name functions "[]" for symbols with an empty description - #18707

Merged
JLHwung merged 1 commit into
mainfrom
jlhwung/fix-set-function-name-empty-symbol
Nov 25, 2026
Merged

JLHwung merged 1 commit into
mainfrom
jlhwung/fix-set-function-name-empty-symbol

Conversation

@JLHwung

@JLHwung JLHwung commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor
Q                       A
Fixed Issues? The setFunctionName inferenced incorrect name from Symbol("")
Patch: Bug Fix? Yes
Major: Breaking Change?
Minor: New Feature?
Tests Added + Pass? Yes
Documentation PR Link
Any Dependency Changes?
Need backport? 7.x
License MIT

Per spec 10.2.9 step 2, the name of Symbol("") should be [], currently the setFunctionName emits an empty string as if the description were undefined.

SetFunctionName only uses the empty string when the symbol description
is undefined: `Symbol("")` gives the name "[]".

Assisted-by: Claude Opus 5.5
@JLHwung JLHwung added PR: Bug Fix 🐛 A type of pull request used for our changelog categories 7.x: needs backport labels Nov 24, 2026
@babel-bot

Copy link
Copy Markdown
Collaborator

Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/63752

@pkg-pr-new

pkg-pr-new Bot commented Nov 24, 2026

Copy link
Copy Markdown

Open in StackBlitz

commit: 3214f9b

@JLHwung
JLHwung added this pull request to the merge queue Nov 25, 2026
Merged via the queue into main with commit 6b7125e Nov 25, 2026
56 checks passed
@JLHwung
JLHwung deleted the jlhwung/fix-set-function-name-empty-symbol branch November 25, 2026 15:09
@babel-bot

Copy link
Copy Markdown
Collaborator

Backported to 7.x in #18721.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PR: Bug Fix 🐛 A type of pull request used for our changelog categories

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants