mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-23 08:47:56 +01:00
Fix the adler.update implementation.
This commit is contained in:
1 parent
d770bf7534
commit
f9cea5c17c
8 files changed
+186
-40
No files matched your search
+3
-3
@@ -509,13 +509,13 @@ func (q *checker) tcheckExprOther(n *a.Expr, depth uint32) error {
|
||||
return err
|
||||
}
|
||||
lTyp := lhs.MType()
|
||||
if lTyp.Decorator().Key() != t.KeyOpenBracket {
|
||||
return fmt.Errorf("check: %s is an array-index expression but %s has type %s, not an array type",
|
||||
if key := lTyp.Decorator().Key(); key != t.KeyOpenBracket && key != t.KeyColon {
|
||||
return fmt.Errorf("check: %s is an index expression but %s has type %s, not an array or slice type",
|
||||
n.String(q.tm), lhs.String(q.tm), lTyp.String(q.tm))
|
||||
}
|
||||
rTyp := rhs.MType()
|
||||
if !rTyp.IsNumTypeOrIdeal() {
|
||||
return fmt.Errorf("check: %s is an array-index expression but %s has type %s, not a numeric type",
|
||||
return fmt.Errorf("check: %s is an index expression but %s has type %s, not a numeric type",
|
||||
n.String(q.tm), rhs.String(q.tm), rTyp.String(q.tm))
|
||||
}
|
||||
n.SetMType(lTyp.Inner())
|
||||
|
||||
Reference in new issue
Block a user