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

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

8
test/xorshift.cwa Normal file
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
}