Cover short-circuiting and transfers in nested branch arms

This commit is contained in:
Codex committed 2026-11-23 19:53:40 +08:00
1 parent 1dc088b602
commit b1314328e6
2 files changed
+50

No files matched your search

@@ -0,0 +1,9 @@
{
"args": {},
"function": "main",
"stdout": "",
"value": {
"decimal": "4",
"type": "int"
}
}
@@ -0,0 +1,41 @@
## @exec main
`轮次 = 0`
`合计 = 0`
`while 轮次 < 4`
`轮次 = 轮次 + 1`
`if 轮次 == 1`
`合计 = 合计 + 1`
`else if 1 / (轮次 - 1) > 0`
`if 轮次 == 2`
`continue`
`else`
`合计 = 合计 + 3`
`break`
`end`
`else if 1 / 0 > 0`
`return -1`
`else`
`return -2`
`end`
`end`
`return 合计`