Skip to content

Conversation

@overlookmotel
Copy link
Member

@overlookmotel overlookmotel commented Nov 5, 2025

Correct the custom deserializer for FormalParameter. Was using the span offsets from BindingRestElement, when should be FormalParameter. span is the 1st field in both structs, so this fix makes no difference to the generated deserializer code, but it makes sure it'll remain correct if span field in either struct moves position later on.

@github-actions github-actions bot added the A-ast Area - AST label Nov 5, 2025
Copy link
Member Author

overlookmotel commented Nov 5, 2025


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • 0-merge - adds this PR to the back of the merge queue
  • hotfix - for urgent hot fixes, skip the queue and merge this PR next

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes incorrect type annotations in the deserialization code for FormalParameter when creating a TSParameterProperty. The change corrects references to span positions that were incorrectly annotated with <BindingRestElement> when they should directly reference the FormalParameter's span.

  • Removed incorrect <BindingRestElement> type annotations from POS_OFFSET references in the TSParameterProperty deserialization path

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@codspeed-hq
Copy link

codspeed-hq bot commented Nov 5, 2025

CodSpeed Performance Report

Merging #15302 will not alter performance

Comparing 10-22-fix_ast_estree_correct_raw_transfer_deserializer_for_formalparameter_ (080a69a) with main (798216b)1

Summary

✅ 37 untouched

Footnotes

  1. No successful run was found on main (69e61d4) during the generation of this report, so 798216b was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

@overlookmotel overlookmotel self-assigned this Nov 5, 2025
@graphite-app graphite-app bot added the 0-merge Merge with Graphite Merge Queue label Nov 5, 2025
@graphite-app
Copy link
Contributor

graphite-app bot commented Nov 5, 2025

Merge activity

…er` (#15302)

Correct the custom deserializer for `FormalParameter`. Was using the span offsets from `BindingRestElement`, when should be `FormalParameter`. `span` is the 1st field in both structs, so this fix makes no difference to the generated deserializer code, but it makes sure it'll remain correct if `span` field in either struct moves position later on.
@graphite-app graphite-app bot force-pushed the 10-22-fix_ast_estree_correct_raw_transfer_deserializer_for_formalparameter_ branch from 080a69a to d92451e Compare November 5, 2025 11:22
@graphite-app graphite-app bot merged commit d92451e into main Nov 5, 2025
20 checks passed
@graphite-app graphite-app bot deleted the 10-22-fix_ast_estree_correct_raw_transfer_deserializer_for_formalparameter_ branch November 5, 2025 11:28
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Nov 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-ast Area - AST C-bug Category - Bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants