Skip to content

Can't define extensions for two same named types in a single module #18815

@auduchinok

Description

@auduchinok
module Compiled

type Task = { F: int }

module CompiledExtensions =
    type System.Threading.Tasks.Task with
        static member CompiledStaticExtension() = ()

    type Task with
        static member CompiledStaticExtension() = ()
Error FS2014:
  A problem occurred writing the binary 'obj\Debug\net9.0\refint\Compiled.dll': Error in pass2 for type Compiled, error:
  Error in pass2 for type CompiledExtensions, error: duplicate entry 'Task.CompiledStaticExtension.Static' in method table

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    Status

    New

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions