Skip to content

Commit fe604c5

Browse files
Add regression test for issue #76042
1 parent 893fadd commit fe604c5

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

src/test/ui/issues/issue-76042.rs

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
// run-pass
2+
3+
fn foo(a: i128, b: i128, s: u32) -> (i128, i128) {
4+
if s == 128 {
5+
(0, 0)
6+
} else {
7+
(b >> s, a >> s)
8+
}
9+
}
10+
fn main() {
11+
let r = foo(0, 8, 1);
12+
if r.0 != 4 {
13+
panic!();
14+
}
15+
}

0 commit comments

Comments
 (0)