Skip to content

Add test case where RestBindingInitialization throws because of getter#4917

Open
G-Lee1031 wants to merge 2 commits intotc39:mainfrom
G-Lee1031:restbindinginitialization
Open

Add test case where RestBindingInitialization throws because of getter#4917
G-Lee1031 wants to merge 2 commits intotc39:mainfrom
G-Lee1031:restbindinginitialization

Conversation

@G-Lee1031
Copy link
Contributor

Hello.
This PR adds a test case where RestBindingInitialization performed in two cases of BindingInitialization throws when getter of the source object throws.

Check 1 covers

ObjectBindingPattern : { BindingRestProperty }. RestBindingInitialization is performed in step 2.

Check 2 covers

ObjectBindingPattern : { BindingPropertyList , BindingRestProperty }. RestBindingInitialization is performed in step 2.

In RestBindingInitialization, CopyDataProperties is performed in step 3. And in CopyDataProperties step 4.c.ii.1, Get(from, nextKey) is called. In this particular PR, I set value as {get 1 () {throw new Test262Error}}; so that Get(from, nextKey) throws.

@G-Lee1031 G-Lee1031 requested a review from a team as a code owner February 10, 2026 05:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants