about summary refs log tree commit diff
path: root/boot/tests/lower/while_loop.cskt
diff options
context:
space:
mode:
Diffstat (limited to 'boot/tests/lower/while_loop.cskt')
-rw-r--r--boot/tests/lower/while_loop.cskt6
1 files changed, 3 insertions, 3 deletions
diff --git a/boot/tests/lower/while_loop.cskt b/boot/tests/lower/while_loop.cskt
index b191df5..38f8609 100644
--- a/boot/tests/lower/while_loop.cskt
+++ b/boot/tests/lower/while_loop.cskt
@@ -1,7 +1,7 @@
 while loops are 1:1 with the intermediate representation's
 single loop kind.
-compound assignments desugar into a simple pair of a simple
-assignment and binary operation.
+increment/decrement statements lower to an expression statement
+wrapping the dedicated inc/dec ir node.
 
 <<<
 
@@ -28,7 +28,7 @@ main = fun () {
 		(function 0 main main (returns (ref void)) (block
 			(declaration i (ref int) (initializer (expr 0)))
 			(loop (condition (expr (binary < (expr (name i)) (expr 10)))) (block
-				(assign (expr (name i)) (expr (binary + (expr (name i)) (expr 1))))
+				(expression-stmt (expr (postfix-++ (expr (name i)))))
 			))
 		)))
 	(emission_order 0 1 2 3 4 5 6 7))