mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-19 16:47:28 +01:00
check: allow p[i] if p has type "ptr array[N] T"
This commit is contained in:
1 parent
b97560b292
commit
2644620770
1 file changed
+3
-1
@@ -1026,7 +1026,9 @@ func (q *checker) bcheckExprOther(n *a.Expr, depth uint32) (bounds, error) {
|
||||
lengthExpr = lTyp.ArrayLength()
|
||||
} else if lTyp.IsPointerType() && lTyp.Inner().IsEitherArrayType() {
|
||||
lengthExpr = lTyp.Inner().ArrayLength()
|
||||
if err := q.proveRecvNotEqNullptr(lhs); err != nil {
|
||||
if lTyp.Decorator() == t.IDPtr {
|
||||
// No-op.
|
||||
} else if err := q.proveRecvNotEqNullptr(lhs); err != nil {
|
||||
return bounds{}, err
|
||||
}
|
||||
} else {
|
||||
|
||||
Reference in new issue
Block a user