mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-20 08:47:28 +01:00
Add an io_writer var to gif's decoder.decode_id
This commit is contained in:
1 parent
0f32650064
commit
2d3b3b1dae
7 files changed
+47
-15
No files matched your search
+2
-8
@@ -123,15 +123,9 @@ func (q *checker) tcheckStatement(n *a.Node) error {
|
||||
if err := q.tcheckExpr(o.Expr(), 0); err != nil {
|
||||
return err
|
||||
}
|
||||
isIOType := false
|
||||
if typ := o.Expr().MType(); typ.Decorator() == 0 {
|
||||
if qid := typ.QID(); qid[0] == t.IDBase && (qid[1] == t.IDIOReader || qid[1] == t.IDIOWriter) {
|
||||
isIOType = true
|
||||
}
|
||||
}
|
||||
if !isIOType {
|
||||
if typ := o.Expr().MType(); !typ.IsIOType() {
|
||||
return fmt.Errorf("check: io_bind expression %q, of type %q, does not have an I/O type",
|
||||
o.Expr().Str(q.tm), o.Expr().MType().Str(q.tm))
|
||||
o.Expr().Str(q.tm), typ.Str(q.tm))
|
||||
}
|
||||
}
|
||||
for _, o := range n.Body() {
|
||||
|
||||
Reference in new issue
Block a user