Skip to content

duplicate entry '.cctor' in method table #19445

@ingted

Description

@ingted

Please provide a succinct description of the issue.

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

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

Actual behavior

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

>

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

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    Status

    New

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions