Fix invalid type assertion in LoadBytes (#733)

Fixes #732
This commit is contained in:
Cameron Moore
2022-01-05 08:17:32 -06:00
committed by GitHub
parent 1baee4630f
commit fed1464066
2 changed files with 11 additions and 1 deletions
+10
View File
@@ -4119,3 +4119,13 @@ ErrorField = "foo"
t.Fatalf("error was expected")
}
}
func TestGithubIssue732(t *testing.T) {
var v interface{}
data := []byte("a=\nb=0")
err := Unmarshal(data, &v)
if err == nil {
t.Fatalf("error was expected")
}
}