Skip to content

Verify PR #59661 implementation is already ported #19

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Copilot
Copy link

@Copilot Copilot AI commented Jun 9, 2025

This PR confirms that the changes from TypeScript PR #59661 ("Report implicit any error when widening null/undefined in presence of generic contextual signatures") have already been successfully ported to the Go codebase.

Analysis Summary

The investigation revealed that all key components from the original TypeScript PR are already implemented:

✅ Core Logic Changes

  • shouldReportErrorsFromWideningWithContextualSignature() function exists in internal/checker/checker.go
  • reportErrorsFromWidening() contains the updated conditional logic
  • Logic correctly handles generic return types in contextual signatures

✅ Diagnostic Message Updates

  • Message TS7025 updated to remove "because it does not yield any values" text
  • Located in internal/diagnostics/diagnostics_generated.go

✅ Test Coverage

✅ Behavior Verification

Tested the Go implementation against the exact test cases from the TypeScript PR:

// These correctly report TS7011 implicit any errors:
declare function f1<T>(cb: () => T): void;
f1(() => null);

Promise.resolve().catch(e => null);
Promise.resolve().then(v => null);

The Go compiler produces identical output to the official TypeScript compiler, confirming the port is complete and correct.

No Changes Required

Since the implementation is already complete and working correctly, no code changes were made to the repository.

Fixes #18.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

@Copilot Copilot AI changed the title [WIP] Port #59661 Verify PR #59661 implementation is already ported Jun 9, 2025
@Copilot Copilot AI requested a review from andrewbranch June 9, 2025 17:11
Copilot finished work on behalf of andrewbranch June 9, 2025 17:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Port #59661 Promise.catch null vs null as null
2 participants