Skip to content

Add regression test: #15987, SRTP overload resolution returns correct typed value#19535

Merged
T-Gro merged 1 commit intomainfrom
regression-test/issue15987-8ba1ee36e5a83c8d
Apr 1, 2026
Merged

Add regression test: #15987, SRTP overload resolution returns correct typed value#19535
T-Gro merged 1 commit intomainfrom
regression-test/issue15987-8ba1ee36e5a83c8d

Conversation

@github-actions
Copy link
Copy Markdown
Contributor

🤖 This PR was created by Repo Assist, an automated AI assistant.

Fixes #15987

Adds a regression test verifying that SRTP (statically resolved type parameters) trait call overload resolution correctly selects the most specific overload based on argument type.

The original issue demonstrated that call 42. returned obj (null) instead of float when an SRTP-backed inline function had multiple typed overloads (float, decimal) plus a generic fallback. This was a regression introduced in SDK 7.0.400.

Test added: Issue 15987 - SRTP overload resolution returns correct value for typed argument in tests/FSharp.Compiler.ComponentTests/Conformance/Types/TypeConstraints/IWSAMsAndSRTPs/IWSAMsAndSRTPsTests.fs

Generated by Repo Assist ·

To install this agentic workflow, run

gh aw add githubnext/agentics/workflows/repo-assist.md@9135cdfde26838a01779aa966628308404ec1f02

… typed value

Verifies that SRTP trait call selects the correct overload based on argument type:
float -> float overload, decimal -> decimal overload, 't -> int fallback overload.
Previously returned obj (null) instead of the expected typed value.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions github-actions bot requested a review from a team as a code owner March 31, 2026 19:20
@github-actions github-actions bot added AI-Issue-Regression-PR PR adding regression test for a closed issue NO_RELEASE_NOTES Label for pull requests which signals, that user opted-out of providing release notes labels Mar 31, 2026
@github-actions github-actions bot requested a review from abonie March 31, 2026 19:20
@github-actions github-actions bot requested a review from T-Gro March 31, 2026 19:20
@abonie
Copy link
Copy Markdown
Member

abonie commented Mar 31, 2026

Something seems wrong here, the PR description and code change is not inline with the #15987 linked and the PR title

@github-project-automation github-project-automation bot moved this from New to In Progress in F# Compiler and Tooling Apr 1, 2026
@T-Gro T-Gro merged commit 4b57615 into main Apr 1, 2026
46 checks passed
@T-Gro T-Gro deleted the regression-test/issue15987-8ba1ee36e5a83c8d branch April 1, 2026 09:48
@github-project-automation github-project-automation bot moved this from In Progress to Done in F# Compiler and Tooling Apr 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AI-Issue-Regression-PR PR adding regression test for a closed issue NO_RELEASE_NOTES Label for pull requests which signals, that user opted-out of providing release notes

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

SRTP Regression in .net SDK release 7.0.400

2 participants