From bf3afab25afe83dc8c33d7f04ec67de95b8c1bbc Mon Sep 17 00:00:00 2001 From: Nigel Tao Date: Tue, 23 Apr 2024 23:19:25 +1000 Subject: [PATCH] check: bounds-check roslice peeks, not just slice --- lang/check/bounds.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lang/check/bounds.go b/lang/check/bounds.go index 51b64e79..887b25da 100644 --- a/lang/check/bounds.go +++ b/lang/check/bounds.go @@ -1259,7 +1259,7 @@ func (q *checker) bcheckExprCallSpecialCases(n *a.Expr, depth uint32) (bounds, e } } - } else if recvTyp.Eq(typeExprSliceU8) { + } else if recvTyp.Eq(typeExprSliceU8) || recvTyp.Eq(typeExprRosliceU8) { if method >= t.IDPeekU8 { if m := method - t.IDPeekU8; m < t.ID(len(ioMethodAdvances)) { au := ioMethodAdvances[m]