feat: handle single constr when with multiple branches

Add case to acceptance test 40
Add special case for top level single constr in a when.
This commit is contained in:
Kasey White
2023-02-20 00:51:03 -05:00
committed by Lucas
parent 95fce14b75
commit 87eb4ca3b4
2 changed files with 32 additions and 6 deletions

View File

@@ -73,3 +73,12 @@ test single_field_expect() {
expect CreateVoteBatch { id } = redeemer
id == #""
}
test single_when() {
let redeemer = CreateVoteBatch { id: #"" }
let x = when redeemer is {
CreateVoteBatch { id } -> id == #""
_ -> False
}
x == True
}