Skip to content

Conversation

@priyankagnana
Copy link

@priyankagnana priyankagnana commented Nov 24, 2025

Related to #62779
This PR adds a failing compiler test for issue #62779.

Summary
The test demonstrates that this inside a reverse-mapped type leaks a generic key type and causes incorrect inference (T[string]) instead of the concrete property return type.

Files added

  • tests/cases/compiler/reverseMappedThisLeak.ts
  • tests/baselines/reference/reverseMappedThisLeak.errors.txt
  • tests/baselines/reference/reverseMappedThisLeak.js
  • tests/baselines/reference/reverseMappedThisLeak.types
  • tests/baselines/reference/reverseMappedThisLeak.symbols

Reproduction
The test is the minimal reproduction from the issue and is runnable with the existing test harness.

Notes

  • This PR does not include a compiler fix — only a failing test + baselines to help maintainers reproduce and track the bug.
  • To reproduce locally:
    • npm test -- tests/cases/compiler/reverseMappedThisLeak.ts (should pass once baselines are in reference/)
    • npm test -- --generateBaseline was used earlier to create these baselines.

(Please let me know if maintainers want a smaller repro or further variations.)

@github-project-automation github-project-automation bot moved this to Not started in PR Backlog Nov 24, 2025
@typescript-bot typescript-bot added the For Uncommitted Bug PR for untriaged, rejected, closed or missing bug label Nov 24, 2025
@typescript-bot
Copy link
Collaborator

This PR doesn't have any linked issues. Please open an issue that references this PR. From there we can discuss and prioritise.

@jakebailey
Copy link
Member

We don't need a PR for the failing test alone. The issue already has it, so we should add this when the issue is fixed.

@jakebailey jakebailey closed this Dec 4, 2025
@github-project-automation github-project-automation bot moved this from Not started to Done in PR Backlog Dec 4, 2025
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

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants