Skip to content

Commit

Permalink
hacking
Browse files Browse the repository at this point in the history
  • Loading branch information
g-r-a-n-t committed Mar 26, 2021
1 parent 6686d27 commit 6801c55
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 12 deletions.
2 changes: 1 addition & 1 deletion compiler/src/lowering/mappers/functions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ fn aug_assign(context: &Context, stmt: Node<fe::FuncStmt>) -> fe::FuncStmt {

let new_value_kind = fe::Expr::BinOperation {
left: Box::new(lowered_target.clone().new_id()),
op: op.to_owned(),
op,
right: Box::new(lowered_value),
};

Expand Down
7 changes: 1 addition & 6 deletions compiler/src/yul/mappers/expressions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -278,12 +278,7 @@ pub fn expr_bin_operation(context: &Context, exp: &Node<fe::Expr>) -> yul::Expre
}
_ => unreachable!(),
},
fe::BinOperator::FloorDiv => match typ {
Type::Base(Base::Numeric(integer)) => {
expression! { [names::checked_div(integer)]([yul_left], [yul_right]) }
}
_ => unreachable!(),
},
fe::BinOperator::FloorDiv => unimplemented!(),
};
}

Expand Down
1 change: 0 additions & 1 deletion compiler/tests/features.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1203,7 +1203,6 @@ fn self_address() {
case(26, "bit_or", 42, 58),
case(26, "bit_xor", 42, 48),
case(26, "bit_and", 42, 10),
case(30, "floor_div", 9, 3),
case(2, "add_from_sto", 5, 7),
case(2, "add_from_mem", 5, 7)
)]
Expand Down
4 changes: 0 additions & 4 deletions compiler/tests/fixtures/features/aug_assign.fe
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,6 @@ contract Foo:
a &= b
return a

pub def floor_div(a: u8, b: u8) -> u8:
a //= b
return a

pub def add_from_sto(a: u256, b: u256) -> u256:
self.my_num = a
self.my_num += b
Expand Down

0 comments on commit 6801c55

Please sign in to comment.