From c905c62d667e9f05a6fa3d2f6acbc7af081b3a73 Mon Sep 17 00:00:00 2001 From: cuiweixie Date: Wed, 20 Aug 2025 19:33:49 +0800 Subject: [PATCH] go/ast: using reflect.TypeAssert Change-Id: Ib4804cc444da4566d1a6f74b918d529072100ae3 --- src/go/ast/print.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/go/ast/print.go b/src/go/ast/print.go index ccef0577da0f7a..a33980297c2181 100644 --- a/src/go/ast/print.go +++ b/src/go/ast/print.go @@ -193,7 +193,7 @@ func (p *printer) print(x reflect.Value) { p.printf("}") case reflect.Slice: - if s, ok := x.Interface().([]byte); ok { + if s, ok := reflect.TypeAssert[[]byte](x); ok { p.printf("%#q", s) return }