Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

odinfmt misplaces the closing brace on a for ... do if .. loop #169

Closed
jrfondren opened this issue Dec 3, 2022 · 1 comment
Closed

odinfmt misplaces the closing brace on a for ... do if .. loop #169

jrfondren opened this issue Dec 3, 2022 · 1 comment

Comments

@jrfondren
Copy link

This program correctly prints 5, looping over the potential members of a bit_set and then printing them if found in it:

package main

import "core:fmt"

main :: proc() {
	bag: bit_set[0 ..< 10] = {5}
	for x in 0 ..< 10 do if x in bag {
			fmt.println(x)
		}
}

formatting is with a freshly built odinfmt from master.

@DanielGavin
Copy link
Owner

This is now fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants