Different indentation level changes behaviour of the code
- Dominant language
- F#
- Stars
- 4.3k
- Forks
- 876
- Avg merge
- 4d 11h
- Merged PRs (30d)
- 131
Description
``` fsharp
let foo t = "(" + t + ")"
let tttt =
let text =
match Some "" with
| Some t ->
match t with
| "" ->
"a"
| "b" ->
"b"
|> foo
| _ -> "fooo"
text
let tttt' =
let text =
match Some "" with
| Some t ->
match t with
| "" ->
"a"
| "b" ->
"b"
|> foo
| _ -> "fooo"
text
```
In `foo` I use two spaces for indentation, in `foo'` four spaces are used.
The resulting expressions are different while I'd had expected those to be the same.
I tried to find something which would explain that in the language specification (which I haven't thoroughly read) but failed, and the behaviour seems to fail me at "principle of least surprise" so submitting this as an issue to get clarification.
Thanks.
Contributor guide
Assessment
This issue has not been assessed yet.