We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
func isNegative(x uint) bool { if x < 0 { return true } return false }
I was surprised to see that this compiles to:
0x0000 00000 (x.go:4) MOVQ "".x+8(SP), AX 0x0005 00005 (x.go:4) TESTQ AX, AX 0x0008 00008 (x.go:4) JCC 16 0x000a 00010 (x.go:5) MOVB $1, "".~r1+16(SP) 0x000f 00015 (x.go:5) RET 0x0010 00016 (x.go:8) MOVB $0, "".~r1+16(SP) 0x0015 00021 (x.go:8) RET
I expected just return false.
return false
Noticed while poking around at #36346. Not sure how often this would fire in real code.
The text was updated successfully, but these errors were encountered:
When I started writing rewrite rules to fix these, I realized I've been here before. Oops. Duplicate of #21439.
Sorry, something went wrong.
No branches or pull requests
I was surprised to see that this compiles to:
I expected just
return false
.Noticed while poking around at #36346. Not sure how often this would fire in real code.
The text was updated successfully, but these errors were encountered: