Skip to content

Commit

Permalink
Add regression test for issue #76042
Browse files Browse the repository at this point in the history
  • Loading branch information
LeSeulArtichaut committed Sep 24, 2020
1 parent 893fadd commit fe604c5
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/test/ui/issues/issue-76042.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// run-pass

fn foo(a: i128, b: i128, s: u32) -> (i128, i128) {
if s == 128 {
(0, 0)
} else {
(b >> s, a >> s)
}
}
fn main() {
let r = foo(0, 8, 1);
if r.0 != 4 {
panic!();
}
}

0 comments on commit fe604c5

Please sign in to comment.