Skip to content

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

Merged
T-Gro merged 2 commits into
dotnet:mainfrom
dawedawe:fix-16330
Nov 28, 2023
Merged

Bugfix for 16330: Error while using [<TailCall>]#16347
T-Gro merged 2 commits into
dotnet:mainfrom
dawedawe:fix-16330

Conversation

@dawedawe

Copy link
Copy Markdown
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 Nov 27, 2023

@psfinaki psfinaki 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.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants