Skip to content

Conversation

@Andarist
Copy link
Contributor

@Andarist Andarist commented Jun 4, 2025

Copilot AI review requested due to automatic review settings June 4, 2025 14:30
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 ports changes from a TypeScript pull request to improve the handling of extra parentheses in narrowing type checks.

  • Updates expected outputs in test baselines for narrowing types when extra parentheses are used.
  • Modifies operand evaluation in the binder to use ast.SkipParentheses, ensuring consistency in narrowing binary expressions.

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
testdata/baselines/reference/submodule/compiler/narrowingTypeofParenthesized1.types.diff Adjusts expected diff output to reflect updated narrowing type behavior.
testdata/baselines/reference/submodule/compiler/narrowingTypeofParenthesized1.types Updates test baseline results to align with new narrowing outcomes.
internal/binder/binder.go Refines narrowing operand evaluation by stripping extra parentheses using ast.SkipParentheses.

@jakebailey jakebailey added this pull request to the merge queue Jun 4, 2025
Merged via the queue into microsoft:main with commit b32c5ae Jun 4, 2025
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants