Skip to content

fix(all): distinguish delegates in overload suffixes - #5274

Draft
MangelMaxime wants to merge 3 commits into
mainfrom
fix/delegate-overload-suffix
Draft

MangelMaxime wants to merge 3 commits into
mainfrom
fix/delegate-overload-suffix

Conversation

@MangelMaxime

Copy link
Copy Markdown
Member

Fixes #3519.

@github-actions

github-actions Bot commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

Python Type Checking Results (Pyright)

Metric Value
Total errors 33
Files with errors 4
Excluded files 4
New errors ✅ No
Excluded files with errors (4 files)

These files have known type errors and are excluded from CI. Remove from pyrightconfig.ci.json as errors are fixed.

File Errors Status
temp/tests/Python/test_hash_set.py 18 Excluded
temp/tests/Python/test_applicative.py 11 Excluded
temp/tests/Python/test_nested_and_recursive_pattern.py 2 Excluded
temp/tests/Python/fable_modules/thoth_json_python/encode.py 2 Excluded

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

No active review issues remain for the change distinguishing function and delegate overload names.

No open issues 🎉

What changed in this PR

Addresses #3519 by distinguishing F# functions from delegates in Fable’s shared overload-name generation, preventing name collisions between those overloads.

Changes:

  • Adds a delegate-specific prefix to type names used to calculate overload suffixes.
  • Updates comparer factory signatures in the TypeScript and Rust runtime sources to match delegate-based callers.
  • Adds regression tests for function, Func, and Action overloads across five targets.
File Description
tests/​Rust/​tests/​src/​TypeTests.fs Adds Rust delegate-overload regression tests.
tests/​Python/​TestType.fs Adds Python delegate-overload regression tests.
tests/​Js/​Main/​TypeTests.fs Adds JavaScript delegate-overload regression tests.
tests/​Dart/​src/​TypeTests.fs Adds Dart delegate-overload regression tests.
tests/​Beam/​TypeTests.fs Adds BEAM delegate-overload regression tests.
src/​Fable.Transforms/​OverloadSuffix.fs Distinguishes delegate signatures when hashing overload names.
src/​fable-library-ts/​System.Collections.Generic.fs Aligns comparer factories with delegate-based overload suffixes.
src/​fable-library-rust/​src/​System.Collections.Generic.fs Aligns Rust comparer factories with delegate-based overload suffixes.

Review effort: Balanced

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

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cannot create overload to support delegate forms of functions

2 participants