Skip to content

Signature generation roundtrip issue: single-case struct DU gets spurious bar #19597

Closed

Description

@T-Gro

Implementation:

module Repro
[<Struct>]
type U0 = U0

Actual generated signature:

module Repro
[<Struct>]
type U0 = | U0

Note the | before U0.

Error on roundtrip compile:

error FS0300: The type definitions for type 'U0' in the signature and implementation are not compatible because the types have different base types

Expected signature:

module Repro
[<Struct>]
type U0 = U0

Verified: roundtrips successfully without the |.

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 3 commits that reference this issue on Apr 17, 2026
    1f36673
    a9c36a3
    2abe16d
  5. added a commit that references this issue on Apr 28, 2026
    f83dc6d
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