Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 16, 2026

  • Reproduce the stack overflow issue
  • Identify the root cause: getBindingElementTypeFromParentType at line 11692 calls getTypeOfInitializer which checks the initializer { c: 0, f }. Checking the object literal requires checking shorthand property f, which resolves to the binding element f, creating a circular dependency.
  • Implement fix: Add a guard to avoid calling getTypeOfInitializer when there's a potential circular dependency with binding elements
  • Add test case
  • Run tests
  • Run linter and formatter
Original prompt

Fix the stack overflow that occurs when checking this code:

const { c, f }: string | number | symbol = { c: 0, f };

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

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

Labels

For Uncommitted Bug PR for untriaged, rejected, closed or missing bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants