You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
warning FS0058: Possible incorrect indentation: this token is offside of context started at position (10:20). Try indenting this token further or using standard formatting conventions.
In a similar fashion, indentation rules around adding members to records seem inconsistent, or at least counter-intuitive.
The 2 examples below are valid:
typeFoo1=....{........data:int
....}....memberx.Data= x.data
typeFoo2={
....data:int....}....withmemberx.Data= x.data
... but this one is not:typeFoo3={
....data:int....}....memberx.Data= x.data
There is a workaround - systematically put the opening brace { on the second line - but the "shorter" syntax is quite nice, and allows to write compact and readable code. Given what is currently acceptable syntax, relaxing a bit the rules would be quite nice, and follow the principle of 'least surprise'.
Note: this is loosely related to /archive/suggestion-9156844-relax-some-of-the-indentation-rules ; that specific problem is brought up in the comments.
Note: sorry about the .... but this is the only way I could find to keep the code indentation preserved.
Submitted by Mathias Brandewinder on 8/17/2016 12:00:00 AM
9 votes on UserVoice prior to migration
The current indentation rules around records seem inconsistent, or at least counter-intuitive. Consider for instance:
This is valid. But if you change F in Bar to VeryLongName:
We now get a warning:
In a similar fashion, indentation rules around adding members to records seem inconsistent, or at least counter-intuitive.
The 2 examples below are valid:
There is a workaround - systematically put the opening brace { on the second line - but the "shorter" syntax is quite nice, and allows to write compact and readable code. Given what is currently acceptable syntax, relaxing a bit the rules would be quite nice, and follow the principle of 'least surprise'.
Note: this is loosely related to /archive/suggestion-9156844-relax-some-of-the-indentation-rules ; that specific problem is brought up in the comments.
Note: sorry about the .... but this is the only way I could find to keep the code indentation preserved.
Original UserVoice Submission
Archived Uservoice Comments
The text was updated successfully, but these errors were encountered: