dotnet / dotnet/fsharp

Offside rules for accessibility modifier after the '=' in record declarations might need work

Open
#7,747 0 comments 0 reactions 1 assignee Claimed by @edgarfgp View on GitHub
Area-Compiler-Syntax Feature Improvement
Dominant language
F#
Stars
4.3k
Forks
876
Avg merge
4d 11h
Merged PRs (30d)
131

Description

These forms compile:

```fsharp
type Foo = private { Bar: int; Baz: int }

type Foo = private {
Bar: int
Baz: int }

// Anything where `private {` is on the same line
```

These do not:

```fsharp
type Foo = private
{ Bar: int
Baz: int }

// Anything where `{ Bar...` is not indented a scope further than `private`
```

These do:

```fsharp
type Foo =
private
{ Bar: int
Baz: int }

type Foo = private
{ Bar: int
Baz: int }
```

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.