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
package main func main() { var x interface{} var y interface{} = []int{3, 5} _ = x == x _ = x == y _ = y == y }
The text was updated successfully, but these errors were encountered:
_ = y == y x的值为nil, 而 y 是一个int数组,数组和数组不能==比较,但可以判断数组是否等于 nil
_ = y == y
Sorry, something went wrong.
[]int{3, 5} 是切片,属于不能比较类型,数组是可以比较的。
No branches or pull requests
The text was updated successfully, but these errors were encountered: