commit | bf3afab25afe83dc8c33d7f04ec67de95b8c1bbc | [log] [tgz] |
---|---|---|
author | Nigel Tao <nigeltao@golang.org> | Tue Apr 23 23:19:25 2024 +1000 |
committer | Nigel Tao <nigeltao@golang.org> | Tue Apr 23 23:19:25 2024 +1000 |
tree | a4243d4675e7d3981430cf3c00442efa84825c95 | |
parent | 92ff96359ac5be8d185f18f4874e52e7784596d8 [diff] |
check: bounds-check roslice peeks, not just slice
diff --git a/lang/check/bounds.go b/lang/check/bounds.go index 51b64e7..887b25d 100644 --- a/lang/check/bounds.go +++ b/lang/check/bounds.go
@@ -1259,7 +1259,7 @@ } } - } 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]