dotnet / dotnet/fsharp

Mixing named arguments + callback style and getter should not compile

Open
#17,935 2 comments 0 reactions 0 assignees View on GitHub
Bug help wanted Impact-Low
Dominant language
F#
Stars
4.3k
Forks
876
Avg merge
4d 22h
Merged PRs (30d)
144

Description

I think the code below should not compile.

**Repro steps**

Provide the steps required to reproduce the problem:

```fs
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.

```cs
[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)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.