Skip to content

Private constructor requires attribute #16531

Open
@nojaf

Description

@nojaf

When generating a signature file the result is somewhat unexpected.

Repro steps

module Telplin

type A private () = 
    member a.Foo () = ()

leads to

module Telplin

type A =
  
  member Foo: unit -> unit

Expected behaviour

This should have [<Class>] attribute.

Actual behaviour

Missing attribute does not compile.

Related information

FCS: FSharpCheckFileResults.GenerateSignature

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area-Compiler-SigFileGengeneration of signature files - both compiler and IDEBugImpact-Low(Internal MS Team use only) Describes an issue with limited impact on existing code.

    Type

    Projects

    Status

    New

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions