Skip to content

Fix broken augmentExportEquals2 test fixture - #64748

Open
MaheshDesu (mahesh-desu) wants to merge 2 commits into
microsoft:mainfrom
mahesh-desu:fix/augment-export-equals-test-fixture
Open

MaheshDesu (mahesh-desu) wants to merge 2 commits into
microsoft:mainfrom
mahesh-desu:fix/augment-export-equals-test-fixture

Conversation

@mahesh-desu

@mahesh-desu MaheshDesu (mahesh-desu) commented Oct 12, 2026 •

Copy link
Copy Markdown

Fixes #64927.

The augmentExportEquals2 conformance test fixture had a consecutive duplicate // @filename: file3.ts directive (line 18). The test harness saves the previous unit with empty content when it encounters a new @filename directive, then re-opens the same name — so the content-bearing file3.ts was wiped and the test silently expected zero errors.

Classic TypeScript (5.9.3 / 6.0) expects:

file2.ts(4,16): error TS2671: Cannot augment module './file1' because it resolves to a non-module entity.
file3.ts(3,8): error TS2503: Cannot find namespace 'x'.

Change: remove the duplicate // @filename: file3.ts line (1 line). This restores the full 3-file program and the expected diagnostics, matching the classic baselines exactly.

Baselines: new augmentExportEquals2.errors.txt + updated .js / .types / .symbols.

Credit to Anders Hejlsberg (@ahejlsberg) for diagnosing this on 2026-04-21: "the test is broken. There are two // @filename: file3.ts in a row, which we apparently no longer handle."

Scope note: this addresses only the augmentExportEquals2 half of #63814. The exportAssignmentMembersVisibleInAugmentation spurious TS4060 regression and the @types/node PlatformPath augmentation failure remain open — both require deeper checker work.

Verified locally: full hereby test (no new failures), hereby lint, hereby format, hereby check:format, hereby generate (no diff).

The fixture had a consecutive duplicate `// @filename: file3.ts`
directive, which caused the test harness to save an empty file3.ts
unit and wipe the content-bearing one. The test silently expected
zero errors instead of the classic TS2671 + TS2503 diagnostics.

Removing the duplicate line restores the expected behavior, matching
the classic 5.9/6.0 baselines exactly.

Refs microsoft#63814.

Signed-off-by: MaheshDesu <mahesh.desu3@gmail.com>
Copilot AI balanced review requested due to automatic review settings October 12, 2026 11:46
@typescript-automation typescript-automation Bot added For Uncommitted Bug PR for untriaged, rejected, closed or missing bug labels Oct 12, 2026
@typescript-automation

Copy link
Copy Markdown
Contributor

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

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

The fixture correction is consistent with all regenerated baselines and introduces no unresolved issues.

0 open findings

What changed in this PR

Repairs the augmentExportEquals2 compiler fixture so all three source files are tested and expected diagnostics are restored.

Changes:

  • Removes the duplicate file3.ts directive.
  • Updates emit, type, symbol, and diagnostic baselines.
File Description
augmentExportEquals2.ts Removes duplicate filename directive.
augmentExportEquals2.errors.txt Adds expected diagnostics.
augmentExportEquals2.js Updates emitted JavaScript baseline.
augmentExportEquals2.types Updates type baseline.
augmentExportEquals2.symbols Updates symbol baseline.

🧠 Review effort: Balanced


💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.

This branch has not been deployed

No deployments
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: Not started

Development

Successfully merging this pull request may close these issues.

augmentExportEquals2 fixture has a duplicate @filename directive

2 participants