Skip to content

Mixing named arguments + callback style and getter should not compile #17935

Open
@MangelMaxime

Description

@MangelMaxime

I think the code below should not compile.

Repro steps

Provide the steps required to reproduce the problem:

type LabeledProperty = 

    abstract member alert: title:string * message:string option -> unit with get,set

Looking at the C# output it gives the following result which looks incomplete.

[CompilationMapping(SourceConstructFlags.Module)]
public static class @_
{
    [Serializable]
    [CompilationMapping(SourceConstructFlags.ObjectType)]
    public interface LabeledProperty
    {
        override Unit alert { get; set; }
    }
}

Expected behavior

F# compiler should fails the compilation ?

Provide any related information (optional):

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugImpact-Low(Internal MS Team use only) Describes an issue with limited impact on existing code.help wanted

    Type

    Projects

    Status

    In Progress

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions