Skip to content

error: duplicate entry '.cctor' in method table #19187

Closed

Description

@ingted

Please provide a succinct description of the issue.

Repro steps
type U<'T> = | A static member val X = 3
Expected behavior

Per #18767, this should be fixed, however it still exists.

Actual behavior

Image

Known workarounds

Still
``

type U<'T> =
| A of unit
static member val X = 3
;;
type U<'T> =
| A of unit
static member X: int

``

Related information

Provide any related information (optional):

  • Operating system
  • .NET Runtime kind (.NET Core, .NET Framework, Mono) .net 9.0.100 and after, 10.0.101
  • Editing Tools (e.g. Visual Studio Version, Visual Studio) dotnet fsi & (netfx) fsiAnyCpu.exe

Activity

  1. added theissue type on Jan 2, 2026
  2. added this to the Backlog milestone on Jan 2, 2026
  3. T-Gro commented on Jan 2, 2026

    @T-Gro
    Member

    I can see the fix was merged in late September, which was after net10.10x was branched off.
    This fix shall be available with the 10.0.200 release and later releases.

  4. ingted commented on Mar 17, 2026

    @ingted
    ContributorAuthor

    With F#10 (SDK 10.0.201), it still not working.

    root@gemini4_2:/workspace$ dotnet fsi
    
    Microsoft (R) F# Interactive version 15.2.201.0 for F# 10.0
    Copyright (c) Microsoft Corporation. All Rights Reserved.
    
    For help type #help;;
    
    > type U<'T> = | A static member val X = 3;;
    Duplicate in method table is:
     Type index: 3
     Method name: .cctor
     Method arity (num generic params): 0
    
    
    error FS0192: internal error: Error in pass2 for type FSI_0002, error: Error in pass2 for type U`1, error: duplicate entry '.cctor' in method table
    
    >
    
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