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

Brace-less if body with conditionals #328

Closed
Gama11 opened this issue Feb 6, 2019 · 0 comments
Closed

Brace-less if body with conditionals #328

Gama11 opened this issue Feb 6, 2019 · 0 comments
Labels
bug Something isn't working
Milestone

Comments

@Gama11
Copy link
Member

Gama11 commented Feb 6, 2019

Describe the bug

Should probably stay as-is intead of being crammed into a single line? Especially since this still happens with many more #elseif branches.

Input file

class Main {
	public static function main() {
		if (bufsize == null)
			#if php
			bufsize = 8192;
			#else
			bufsize = (1 << 14);
			#end
	}
}

Broken output

class Main {
	public static function main() {
		if (bufsize == null)
			#if php bufsize = 8192; #else bufsize = (1 << 14); #end
	}
}
@Gama11 Gama11 added the bug Something isn't working label Feb 6, 2019
@Gama11 Gama11 added this to the haxe milestone Feb 6, 2019
AlexHaxe added a commit to AlexHaxe/haxe-formatter that referenced this issue Feb 16, 2019
fixed complex conditional typedef, fixes HaxeCheckstyle#336
fixed parameter wrapping with multiline string, HaxeCheckstyle#320
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant