Allow an io_limit limit to be a refined base.u64

This commit is contained in:
Nigel Tao committed 2018-12-15 10:45:36 +11:00
1 parent fad2ddce68
commit 6fe313a72c
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -135,7 +135,7 @@ func (q *checker) tcheckStatement(n *a.Node) error {
if err := q.tcheckExpr(n.Arg1(), 0); err != nil {
return err
}
if typ := n.Arg1().MType(); !typ.Eq(arg1Typ) {
if typ := n.Arg1().MType(); !typ.EqIgnoringRefinements(arg1Typ) {
return fmt.Errorf("check: %s expression %q, of type %q, does not have type %q",
n.Keyword().Str(q.tm), n.Arg1().Str(q.tm), typ.Str(q.tm), arg1Typ.Str(q.tm))
}
+1 -1
View File
@@ -625,7 +625,7 @@ pri func decoder.decode_id_part1!??(dst ptr base.pixel_buffer, src base.io_reade
this.copy_to_image_buffer!?(pb:args.dst)
}
}
var block_size base.u64 = args.src.read_u8_as_u64!??()
var block_size base.u64[..255] = args.src.read_u8_as_u64!??()
if block_size == 0 {
break
}