Skip to content

Commit 9addde4

Browse files
Confirm PR #62549 has already been ported - no changes needed
Co-authored-by: RyanCavanaugh <[email protected]>
1 parent 71dd0ae commit 9addde4

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed

PR_62549_PORT_STATUS.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# Port Status: microsoft/TypeScript#62549
2+
3+
## Summary
4+
**Status: ✅ ALREADY PORTED**
5+
6+
PR #62549 from microsoft/TypeScript has already been successfully ported to the Go codebase.
7+
8+
## Details
9+
10+
### Original Change
11+
The PR "Consistently resolve to the `errorType` on `arguments` with error" changed the TypeScript checker to pass `ignoreArrowFunctions: true` when checking if `arguments` is used in a property initializer or class static block.
12+
13+
**TypeScript change (src/compiler/checker.ts):**
14+
```diff
15+
- if (isInPropertyInitializerOrClassStaticBlock(node)) {
16+
+ if (isInPropertyInitializerOrClassStaticBlock(node, /*ignoreArrowFunctions*/ true)) {
17+
```
18+
19+
### Go Implementation
20+
The equivalent change is already present in the Go codebase:
21+
22+
**File:** `internal/checker/checker.go`, line 10599
23+
```go
24+
if c.isInPropertyInitializerOrClassStaticBlock(node, true /*ignoreArrowFunctions*/) {
25+
c.error(node, diagnostics.X_arguments_cannot_be_referenced_in_property_initializers_or_class_static_initialization_blocks)
26+
return c.errorType
27+
}
28+
```
29+
30+
### Test Results
31+
- ✅ All tests pass
32+
- ✅ The specific test `argumentsUsedInClassFieldInitializerOrStaticInitializationBlock` passes
33+
- ✅ The testdata baseline shows the correct behavior (returning `any` type instead of `IArguments` for `arguments` in arrow functions within property initializers)
34+
35+
### Baseline Differences
36+
The testdata contains `.diff` files showing differences between the Go implementation and the TypeScript submodule baselines. This is expected because:
37+
1. The Go implementation has the change
38+
2. The TypeScript submodule baselines haven't been regenerated yet (shallow clone)
39+
3. The test framework correctly handles these differences
40+
41+
## Conclusion
42+
No action needed. The change has been correctly ported and is functioning as expected.

0 commit comments

Comments
 (0)