Skip to content

Signature generation roundtrip issue: overloaded member with unit parameter #19596

Closed

Description

@T-Gro

Implementation:

module Repro
type R1 = { f1 : int }
type R2 = { f2 : int }
type D() =
    member x.N = x.M { f1 = 3 }
    member x.M((y: R1)) = ()
    member x.M(()) = ()

Actual generated signature:

module Repro

type R1 = { f1: int }
type R2 = { f2: int }
type D =
    new: unit -> D
    member M: unit -> unit
    member M: y: R1 -> unit
    member N: unit

Error on roundtrip compile:

error FS0193: Module requires a value 'member D.M: unit -> unit'

The generated member M: unit -> unit cannot be matched with member x.M(()) = ().

Expected signature:

[<Class>]
type D =
    new: unit -> D
    member M: y: R1 -> unit
    member M: unit -> unit
    member N: unit

Verified: roundtrips successfully (same content, just added [<Class>]).

Activity

  1. self-assigned this
    on Apr 15, 2026
  2. added
    Area-Compiler-SigFileGen
    on Apr 15, 2026
  3. added this to the Backlog milestone on Apr 15, 2026
  4. added 8 commits that reference this issue on Apr 17, 2026
  5. 5 remaining items

  6. added 3 commits that reference this issue on Apr 20, 2026
  7. added 3 commits that reference this issue on Apr 28, 2026
  8. added 2 commits that reference this issue on May 13, 2026
    f40348a
    4e7a8b1
  9. added 3 commits that reference this issue on May 20, 2026
    4e488de
    790c6fc
    58c303a
  10. added a commit that references this issue on May 20, 2026
    6c03a2d
  11. added a commit that references this issue on Jun 3, 2026
    1357c8d
  12. added a commit that references this issue on Jun 16, 2026
    dfd0e1d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Area-Compiler-SigFileGenBugNeeds-Triage

Type

No type

Projects

Relationships

None yet

Development

No branches or pull requests

Issue actions