fix let lazy/inline chains re-using the same variable

This commit is contained in:
dranke committed 2022-05-07 18:33:26 +02:00
1 parent 1e746be750
commit a52fe53a01
2 files changed
+16 -5

No files matched your search

+8
View File
@@ -0,0 +1,8 @@
// simple test to see whether lazy/inline chains with the same variable compile correctly
fn xorshift(x: i32) -> i32 {
let lazy x = x ^ (x << 13);
let lazy x = x ^ (x #>> 17);
let inline x = x ^ (x << 5);
x
}