check if when branch is suffixed

This commit is contained in:
Kiryl Dziamura 2024-06-03 23:04:10 +02:00
parent db94b555ab
commit 3e5cfb546d
No known key found for this signature in database
GPG key ID: FB539501A4561ACF
3 changed files with 28 additions and 1 deletions

View file

@ -576,6 +576,8 @@ pub fn unwrap_suffixed_expression_when_help<'a>(
Err(..) => return Err(EUnwrapped::Malformed),
};
// TODO: unwrap guard
let new_branch = WhenBranch{value: *unwrapped_branch_value, patterns, guard: *guard};
let mut new_branches = Vec::new_in(arena);
let (before, rest) = branches.split_at(branch_index);