dotnet / dotnet/fsharp

Struct tuple type alias should give better error message

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

Description

Struct tuple type alias should give better error message

```fs
type Alias = struct(int * int)
```
This just errors with `Unexpected symbol '(' in member definition`

You really have to know to wrap the full signature for it to succeed. Optionally a docs entry would help too.

As this works:
```fs
type Alias = (struct(int * 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.