-
Notifications
You must be signed in to change notification settings - Fork 789
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
error FS0192: internal error: Error in pass3 for some F# code. #18066
Comments
This seems like it could be related to some of my changes. I will try to take a look tomorrow. |
This a regression from NET8, I also suspect the lowering changes being applied here. |
Here's a more minimal repro: [|for x in [|1UL|] -> x|] The same thing applies for [|for x in [|1un|] -> x|] The problem seems likely to be here fsharp/src/Compiler/Optimize/LowerComputedCollections.fs Lines 393 to 394 in 95fe045
and here fsharp/src/Compiler/Optimize/LowerComputedCollections.fs Lines 360 to 374 in 95fe045
I think we need to be emitting
That was an intermediate optimization introduced in #16948, but superseded in #17067 in part to fix debug stepping in the loop body. SharpLab still has a preview version of 9 that doesn't include #17067, #17419, #17711. |
@sylvainouel Another workaround for the time being would be to set |
I opened a PR that I believe should fix this: #18081. |
Thank you for this fix! |
Repro steps
Copy/paste the following program in F# interactive:
It produces the following error:
error FS0192: internal error: Error in pass3 for type FSI_0003, error: ldelem
Expected behavior
I think it should build fine.
Actual behavior
internal error
Known workarounds
changing the uint64 to int64 fixes it.
Related information
It used to work, it stopped working after upgrading to latest VS.
Operating system
Windows 11
.NET Runtime kind (.NET Core, .NET Framework, Mono)
.NET 9
Microsoft Visual Studio Enterprise 2022 (64-bit) - Current
Version 17.12.1
The text was updated successfully, but these errors were encountered: