1
0
Fork 0
mirror of synced 2025-09-23 12:18:44 +00:00

add missing alignment, changelog

This commit is contained in:
dark64 2023-05-29 23:24:12 +02:00
parent 208215750e
commit 4cc2f6254b
2 changed files with 12 additions and 1 deletions

View file

@ -0,0 +1 @@
Allow any type in assembly witness assignment

View file

@ -1826,7 +1826,17 @@ impl<'ast, T: Field> Checker<'ast, T> {
}
}
false => {
let e = TypedExpression::block(vec![], e);
let aligned = TypedExpression::align_to_type(e, &assignee.get_type())
.map_err(|e| ErrorInner {
span: Some(span),
message: format!(
"Expected value of type `{}`, found `{}` of type `{}`",
e.1,
e.0,
e.0.get_type()
),
})?;
let e = TypedExpression::block(vec![], aligned);
Ok(vec![
TypedAssemblyStatement::assignment(assignee, e).with_span(span)
])