Skip to content

follow-up: extend extractObjectRestParamBindingsWalk to cover class methods and object-literal methods #1357

@carlos-alm

Description

@carlos-alm

Deferred from PR #1350 review.

Original comment: #1350 (comment)

extractObjectRestParamBindingsWalk (Phase 8.3f) handles function_declaration, generator_function_declaration, and variable_declarator (arrow/function expressions), but not method_definition nodes inside class bodies or method shorthand inside object literals.

A pattern like:

class Foo {
  bar({ a, ...rest }) {
    rest.m();  // this edge is not resolved
  }
}

would never emit a binding for bar because the extractor does not walk method_definition nodes.

Context: This is a known scope limitation of Phase 8.3f. It is out of scope for PR #1350 which focuses on the core function/arrow-function case. Extending coverage to class methods and object-literal method shorthand is a logical follow-up.

Metadata

Metadata

Assignees

No one assigned

    Labels

    follow-upDeferred work from PR reviews that needs tracking

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions