summaryrefslogtreecommitdiff
path: root/test.lang
diff options
context:
space:
mode:
authorWormHeamer2025-08-04 22:13:25 -0400
committerWormHeamer2025-08-04 22:13:25 -0400
commit88b01f43312eeceba87a1378be5cd63bb11f167f (patch)
treec7046558223ac692958ca1c7b9da71f05493f148 /test.lang
parent22aa7559a37c49def05e8a43b12561b17a4af258 (diff)
fix bug of lhs getting culled if same node optimized out of rhs
Diffstat (limited to 'test.lang')
-rw-r--r--test.lang5
1 files changed, 3 insertions, 2 deletions
diff --git a/test.lang b/test.lang
index 2277fc3..c2661a4 100644
--- a/test.lang
+++ b/test.lang
@@ -9,6 +9,7 @@
// also single-line now
proc main(a i64) {
- return a + -a
- // (true = 0) = (a xor b)
+ let x = (a + -a) = (a xor a)
+ let y = (a + a) = (a * 2)
+ return x & y & (a = a) & ((a + 2) <> a)
}