Skip to content

Signature file generation should use F# Core alias #14712

Open

Description

@nojaf

When generating a signature file from a type extension with a BCL type (or at least a type that F# Core abbreviated) the full type is used instead of the abbreviated one.

Repro steps

module Hej

type System.Int32 with
    member i.PlusPlus () = i + 1
    member i.PlusPlusPlus () : int = i + 1 + 1

type X(y:int) =
    member x.PlusPlus () = y + 1

leads to

module Hej
type System.Int32 with

  member PlusPlus: unit -> System.Int32
type System.Int32 with

  member PlusPlusPlus: unit -> int

type X =

  new: y: int -> X

  member PlusPlus: unit -> int

Expected behaviour

This is more cosmetic but I was expecting to see unit -> int in all examples.

Actual behaviour

System.Int32 is used when the type is not specified.

Known workarounds

Add return type int explicitly.

Related information

Provide any related information (optional):

  • Operating system
  • .NET Runtime kind (.NET Core, .NET Framework, Mono)
  • Editing Tools (e.g. Visual Studio Version, Visual Studio)

Activity

  1. added this to the Backlog milestone on Feb 7, 2023
  2. added
    Impact-Low
    Area-Compiler-CodeGen
    and removed on Feb 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area-Compiler-CodeGenBugImpact-Low

    Type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions