You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Does this issue reproduce with the latest release?
Yes
What did you expect to see?
reflect.Value.IsValid's document show: It returns false if v is the zero Value.
But, Its behavior does not conform to the documentation.
Run this test and get
func TestReflectValue(t *testing.T) {
var x int
x = 0
if reflect.ValueOf(x).IsValid() {
t.Errorf("Value of int with zero value should not be valid")
}
}
--- FAIL: TestReflectValue (0.00s)
reflect_test.go:13: Value of int with zero value should not be valid
My understanding is wrong? Or document is wrong?
The text was updated successfully, but these errors were encountered:
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What did you expect to see?
reflect.Value.IsValid's document show: It returns false if v is the zero Value.
But, Its behavior does not conform to the documentation.
Run this test and get
My understanding is wrong? Or document is wrong?
The text was updated successfully, but these errors were encountered: