Decode flate code length code lengths.

This commit is contained in:
Nigel Tao committed 2017-07-16 12:51:44 +10:00
1 parent b78807d60a
commit 20f37a6dab
8 files changed
+95 -15

No files matched your search

+8 -1
View File
@@ -312,7 +312,14 @@ func (q *checker) tcheckExprOther(n *a.Expr, depth uint32) error {
return nil
}
}
// TODO: look for (global) names (constants, funcs, structs).
if c, ok := q.c.consts[id1]; ok {
// TODO: check somewhere that a global ident (i.e. a const) is
// not directly in the LHS of an assignment.
n.SetGlobalIdent()
n.SetMType(c.Const.XType())
return nil
}
// TODO: look for other (global) names: funcs, structs.
return fmt.Errorf("check: unrecognized identifier %q", id1.String(q.tm))
}
switch id1.Key() {