Enforce newline after assignment / clause.
This leads to more consistent formatting across entire Aiken programs. Before that commit, only long expressions would be formatted on a newline, causing non-consistent formatting and additional reading barrier when looking at source code. Programs also now take more vertical space, which is better for more friendly diffing in version control systems (especially git).
This commit is contained in:
@@ -3,15 +3,20 @@ type TransactionId {
|
||||
}
|
||||
|
||||
test pattern_match_let() {
|
||||
let x = TransactionId { inner: #"0000" }
|
||||
let TransactionId(y) = x
|
||||
let x =
|
||||
TransactionId { inner: #"0000" }
|
||||
let TransactionId(y) =
|
||||
x
|
||||
y == #"0000"
|
||||
}
|
||||
|
||||
test pattern_match_when() {
|
||||
let x = TransactionId { inner: #"0000" }
|
||||
let y = when x is {
|
||||
TransactionId(y) -> y
|
||||
}
|
||||
let x =
|
||||
TransactionId { inner: #"0000" }
|
||||
let y =
|
||||
when x is {
|
||||
TransactionId(y) ->
|
||||
y
|
||||
}
|
||||
y == #"0000"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user