Fill out the lzw_decoder implementation.

This commit is contained in:
Nigel Tao committed 2017-06-10 15:23:43 +10:00
1 parent 8e279c51bf
commit 8d6694a752
5 files changed
+78 -34

No files matched your search

+1 -1
View File
@@ -373,7 +373,7 @@ func (q *checker) tcheckExprOther(n *a.Expr, depth uint32) error {
n.String(q.tm), lhs.String(q.tm), lTyp.String(q.tm))
}
rTyp := rhs.MType()
if !rTyp.IsNumType() {
if !rTyp.IsNumTypeOrIdeal() {
return fmt.Errorf("%s is an array-index expression but %s has type %s, not a numeric type",
n.String(q.tm), rhs.String(q.tm), rTyp.String(q.tm))
}