Skip to content

Mixed visibility of property getter/setter making property setter not usable in method / constructor invocation. #8351

@smoothdeveloper

Description

@smoothdeveloper
namespace csharp
{
    public class Class
    {
        public int Prop { set; private get; }
    }
}
type Maker =
  static member mkCs () = csharp.Class()
let a = csharp.Class(Prop=1)
let aa = Maker.mkCs(Prop=1)

I'd expect that F# code to work, it works with VB.net and F# defined classes, but not C#.

edit: it doesn't work whenever there is private getter from any non F# IL.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions