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 f(x interface{}) bool { if x == nil { return false } switch x.(type) { case bool: return true default: return false } }
Compiles to
0x0000 00000 (/Users/khr/go/tmp4.go:3) MOVQ "".x+8(SP), AX 0x0005 00005 (/Users/khr/go/tmp4.go:4) TESTQ AX, AX 0x0008 00008 (/Users/khr/go/tmp4.go:4) JEQ 47 0x000a 00010 (/Users/khr/go/tmp4.go:7) JEQ 41 ...
That second branch is useless. We should get rid of it somehow.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Compiles to
That second branch is useless. We should get rid of it somehow.
The text was updated successfully, but these errors were encountered: