Skip to content
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

Bugfix for 16330: Error while using [<TailCall>] #16347

Merged
merged 2 commits into from
Nov 28, 2023
Merged

Conversation

dawedawe
Copy link
Contributor

This fixes #16330

I introduced a bug when I ported PR #1976 to the current code base.
To get the currietArgInfos I should have called GetValReprTypeInFSharpForm, not GetTopTauTypeInFSharpForm.

The bug is an effect of feeding the wrong tau into GetTopTauTypeInFSharpForm.
It's wrong because I used destTopForallTy on fty, which results in unequal lengths of nArgInfos argTys inside of GetTopTauTypeInFSharpForm

By using GetValReprTypeInFSharpForm the correct args are passed to destTopForallTy and nArgInfos and argTys.Length are of equal length.

I also added two regression tests.

- use GetValReprTypeInFSharpForm instead of GetTopTauTypeInFSharpForm
- fixes dotnet#16330
- add regression tests
@dawedawe dawedawe requested a review from a team as a code owner November 27, 2023 15:24
@dawedawe dawedawe changed the title Bugfix for 16330 Bugfix for 16330: Error while using [<TailCall>] Nov 27, 2023
Copy link
Member

@psfinaki psfinaki left a comment

Choose a reason for hiding this comment

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

Thanks!

@T-Gro T-Gro merged commit 879d681 into dotnet:main Nov 28, 2023
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
3 participants