Preserve competing extension witnesses across files · Issue #20684 · dotnet/fsharp · GitHub
Skip to content

Preserve competing extension witnesses across files #20684

Closed

Description

@T-Gro

Repro steps

Library.fs:

module Library
module A =
    type System.String with
        static member (*) (s: string, n: int) = String.replicate n s
    let inline mul x n = x * n
module B =
    type System.String with
        static member (*) (s: string, n: int) = s + string n

Program.fs:

let result: string = Library.A.mul "a" 3
dotnet $fsc --targetprofile:netcore --langversion:preview Library.fs Program.fs

Expected behavior

Compiles; result = "aaa".

Actual behavior

FS0971: Undefined value '*'

Known workarounds

Remove module B.

Related information

Reproduced on fresh main.

Activity

  1. added this to the Backlog milestone on Oct 1, 2026
  2. added a commit that references this issue on Oct 9, 2026
    6cde2b1
  3. added a commit that references this issue on Oct 15, 2026
    2d505d3
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

    No type

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions