Skip to content

Conversation

@mag123c
Copy link

@mag123c mag123c commented Sep 9, 2025

Fixes #62414

Problem

Parameter property self-references like constructor(private f = f) were not detected...

Solution

Add checkParameterPropertySelfReference to detect self-references in initializers...

Known Limitations

  • May have false positives in nested scope shadowing cases
  • Future improvement: scope boundary awareness for better precision
  • Priority: Core bug fix over perfect edge case handling

Alternative Approaches Considered

  • Symbol-based comparison: timing issues with parameter property symbol binding
  • Chose conservative name-based approach with property access exclusion

@typescript-bot typescript-bot added the For Backlog Bug PRs that fix a backlog bug label Sep 9, 2025
@mag123c mag123c force-pushed the fix/parameter-property-self-reference branch from 8670d51 to 56b4588 Compare September 9, 2025 05:57
@RyanCavanaugh
Copy link
Member

This is not currently a correct fix. We are not staffed to coach vibecoded PRs and cannot offer further guidance to assist.

@mag123c mag123c closed this Sep 10, 2025
@mag123c
Copy link
Author

mag123c commented Sep 10, 2025

I apologize for the inadequate implementation. I'll close this PR and study the codebase more thoroughly before attempting a proper solution. Thank you for the feedback.

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

Labels

For Backlog Bug PRs that fix a backlog bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

TypeScript fails to detect self-reference issue in "Parameter Properties" of constructors

3 participants