-
Notifications
You must be signed in to change notification settings - Fork 831
Description
what
When defining a record (and being used to brace languages):
type Foo =
{
bar: int
}F# yields
A type definition requires one or more members or other declarations. If you intend to define an empty class, struct or interface, then use 'type ... = class end', 'interface end' or 'struct end'.
why
I made a "mistake" of putting { on its own line without indenting it
how
I'd like the compiler to tell me how to fix the record definition:
The record definition is invalid due to erroneous indentation, either put the opening brace on same line as type declaration or make it indented.
Note that for C# and VB.NET users (and even more for Resharper users), they'd expect the editor to be helpful with formatting, if I open { after type Name =, it should probably indent or put the brace back to the type declaration line.
I do get rants from C#/VB.NET developers about how F# editor in VS doesn't format the code while being typed and how it makes F# "unusable".
Related: #1103
Metadata
Metadata
Assignees
Labels
Type
Projects
Status