Ban unlabeled break/continue for labeled loop

This commit is contained in:
Nigel Tao committed 2020-02-24 14:20:05 +11:00
1 parent c5b3a9e08e
commit 2d2a880c18
4 files changed
+10 -3

No files matched your search

+1 -1
View File
@@ -225,7 +225,7 @@ pri func decoder.decode_blocks?(dst: base.io_writer, src: base.io_reader) {
if type == 0 {
this.decode_uncompressed?(dst: args.dst, src: args.src)
continue
continue.outer
} else if type == 1 {
status = this.init_fixed_huffman!()
// TODO: "if status.is_error()" is probably more idiomatic, but for
+1 -1
View File
@@ -927,7 +927,7 @@ pri func decoder.decode_id_part2?(dst: ptr base.pixel_buffer, src: base.io_reade
block_size = args.src.read_u8_as_u64?()
}
if block_size == 0 {
break
break.outer
}
while args.src.available() == 0 {
yield? base."$short read"