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).
23 lines
327 B
Plaintext
23 lines
327 B
Plaintext
type TransactionId {
|
|
inner: ByteArray,
|
|
}
|
|
|
|
test pattern_match_let() {
|
|
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
|
|
}
|
|
y == #"0000"
|
|
}
|