allow single var patterns to double as a label in records

This commit is contained in:
rvcas
2022-11-17 12:46:03 -05:00
committed by Lucas
parent d94ae82901
commit 89153a4d82
3 changed files with 28 additions and 10 deletions

View File

@@ -35,8 +35,8 @@ pub fn spend(
) -> Bool {
let x = datum.rdmr
when x is {
sample.Buy { fin: fin, .. } -> fin > 0
sample.Sell { find: fin, .. } -> fin > 0
sample.Buy { fin, .. } -> fin > 0
sample.Sell { find, .. } -> find > 0
sample.Hold(some) -> some > 0
}
}