Skip to content

error FS0192: internal error: Error in pass3 for some F# code. #18066

Description

@sylvainouel

Repro steps

Copy/paste the following program in F# interactive:

type A = {
    F: uint64  
}

type B = {
    C: uint64[]
}

let g x =
    let c = 
        [|
            for d in x.C do
                {
                    F = d
                }
        |]
    c

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

  • Editing Tools (e.g. Visual Studio Version, Visual Studio)
    Microsoft Visual Studio Enterprise 2022 (64-bit) - Current
    Version 17.12.1

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions