25 lines
534 B
Plaintext
25 lines
534 B
Plaintext
|
|
// Phase 131 P0: loop(true) break-once minimal fixture
|
||
|
|
//
|
||
|
|
// Purpose: Test loop(true) { <assign>* ; break } in Normalized shadow
|
||
|
|
// Expected output: 1
|
||
|
|
//
|
||
|
|
// Structure:
|
||
|
|
// x = 0 // pre-loop init
|
||
|
|
// loop(true) { // condition is Bool literal true
|
||
|
|
// x = 1 // body assignment
|
||
|
|
// break // break at end
|
||
|
|
// }
|
||
|
|
// return x // return updated value
|
||
|
|
|
||
|
|
static box Main {
|
||
|
|
main() {
|
||
|
|
local x
|
||
|
|
x = 0
|
||
|
|
loop(true) {
|
||
|
|
x = 1
|
||
|
|
break
|
||
|
|
}
|
||
|
|
return x
|
||
|
|
}
|
||
|
|
}
|