mirror of
https://github.com/hanzoai/yaegi.git
synced 2026-10-01 00:49:47 +00:00
Refactor `for` variants for clarity. Ensure all possible 8 combinations are covered. Fixes #942.
17 lines
154 B
Go
17 lines
154 B
Go
package main
|
|
|
|
func main() {
|
|
max := 1
|
|
for ; ; max-- {
|
|
if max == 0 {
|
|
break
|
|
}
|
|
println("in for")
|
|
}
|
|
println("bye")
|
|
}
|
|
|
|
// Output:
|
|
// in for
|
|
// bye
|