-
Notifications
You must be signed in to change notification settings - Fork 428
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: callback sequences formatted back from .ml (#2799)
* fix: callback sequences formatted back from .ml fixes #2798 * chore: add changelog entry
- Loading branch information
1 parent
564cc3d
commit 6455bb6
Showing
4 changed files
with
39 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
(* Copyright (c) 2015-present, Facebook, Inc. All rights reserved. *) | ||
|
||
let x = | ||
ignore (fun y -> | ||
let y = 4 in | ||
y) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
Format basic | ||
|
||
$ refmt ./input.ml | tee formatted.re | ||
/* Copyright (c) 2015-present, Facebook, Inc. All rights reserved. */ | ||
|
||
let x = | ||
ignore(y => { | ||
let y = 4; | ||
y; | ||
}); | ||
|
||
Format the formatted file back | ||
$ refmt ./formatted.re | tee formatted_back.re | ||
/* Copyright (c) 2015-present, Facebook, Inc. All rights reserved. */ | ||
|
||
let x = | ||
ignore(y => { | ||
let y = 4; | ||
y; | ||
}); | ||
|
||
Ensure idempotency: first format and second format are the same | ||
$ diff formatted.re formatted_back.re |