This commit is contained in:
Protryon 2021-06-04 06:03:59 -07:00
parent 936a35ebd2
commit dc91b07e5c
5 changed files with 7 additions and 9 deletions

View File

@ -213,7 +213,7 @@ impl<'a> FromAst<'a, leo_ast::AssignStatement> for &'a Statement<'a> {
let statement = scope.context.alloc_statement(Statement::Assign(AssignStatement {
parent: Cell::new(None),
span: Some(statement.span.clone()),
operation: statement.operation.clone(),
operation: statement.operation,
target_variable: Cell::new(variable),
target_accesses,
value: Cell::new(value),
@ -231,7 +231,7 @@ impl<'a> FromAst<'a, leo_ast::AssignStatement> for &'a Statement<'a> {
impl<'a> Into<leo_ast::AssignStatement> for &AssignStatement<'a> {
fn into(self) -> leo_ast::AssignStatement {
leo_ast::AssignStatement {
operation: self.operation.clone(),
operation: self.operation,
assignee: leo_ast::Assignee {
identifier: self.target_variable.get().borrow().name.clone(),
accesses: self

View File

@ -347,7 +347,7 @@ impl Canonicalizer {
Statement::Assign(AssignStatement {
assignee,
value,
operation: assign.operation.clone(),
operation: assign.operation,
span: assign.span.clone(),
})
}

View File

@ -325,7 +325,7 @@ pub trait ReconstructingReducer {
value: Expression,
) -> Result<AssignStatement, ReducerError> {
Ok(AssignStatement {
operation: assign.operation.clone(),
operation: assign.operation,
assignee,
value,
span: assign.span.clone(),

View File

@ -65,7 +65,7 @@ impl<'a, F: PrimeField, G: GroupType<F>> ConstrainedProgram<'a, F, G> {
}
}
} else {
for (i, item) in input.into_iter().enumerate() {
for (i, item) in input.iter_mut().enumerate() {
let namespace_string = format!(
"evaluate dyn array assignment eq {} {}:{}",
i, context.span.line_start, context.span.col_start

View File

@ -67,10 +67,8 @@ pub fn run_tests<T: Runner>(runner: &T, expectation_category: &str) {
let mut outputs = vec![];
for (path, content) in tests.into_iter() {
if !filter.is_empty() {
if !path.contains(filter) {
continue;
}
if !filter.is_empty() && !path.contains(filter) {
continue;
}
let config = extract_test_config(&content);
if config.is_none() {