Skip to content

Commit

Permalink
code review
Browse files Browse the repository at this point in the history
  • Loading branch information
guipublic committed Oct 31, 2024
1 parent dadd33f commit fc1ea5b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
x = 64
y = 1
y = 1
z = "-769"
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
fn main(x: u64, y: u8, a: i16) {
fn main(x: u64, y: u8, z: i16) {
// runtime shifts on compile-time known values
assert(64 << y == 128);
assert(64 >> y == 32);
Expand All @@ -18,5 +18,5 @@ fn main(x: u64, y: u8, a: i16) {

assert(x >> (x as u8) == 0);

assert_eq(a >> 3, -97);
assert_eq(z >> 3, -97);
}

0 comments on commit fc1ea5b

Please sign in to comment.