aboutsummaryrefslogtreecommitdiff
path: root/src/encoding/json/jsontext/coder_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/encoding/json/jsontext/coder_test.go')
-rw-r--r--src/encoding/json/jsontext/coder_test.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/encoding/json/jsontext/coder_test.go b/src/encoding/json/jsontext/coder_test.go
index 4a9efb3b8f..8602e3e7ff 100644
--- a/src/encoding/json/jsontext/coder_test.go
+++ b/src/encoding/json/jsontext/coder_test.go
@@ -486,7 +486,7 @@ func testCoderInterleaved(t *testing.T, where jsontest.CasePos, modeName string,
// Retry as a ReadToken call.
expectError := dec.PeekKind() == '}' || dec.PeekKind() == ']'
if expectError {
- if !errors.As(err, new(*SyntacticError)) {
+ if _, ok := errors.AsType[*SyntacticError](err); !ok {
t.Fatalf("%s: Decoder.ReadToken error is %T, want %T", where, err, new(SyntacticError))
}
tickTock = !tickTock