Skip to content

Commit

Permalink
Merge 9a039b9 into 60e2294
Browse files Browse the repository at this point in the history
  • Loading branch information
Razican authored Feb 27, 2022
2 parents 60e2294 + 9a039b9 commit 61712da
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions boa_engine/src/bytecompiler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1510,11 +1510,12 @@ impl<'b> ByteCompiler<'b> {
break;
}
}
assert!(
found,
"Undefined label '{}'",
self.interner().resolve_expect(label_name)
);
if !found {
return self.context.throw_syntax_error(format!(
"Cannot use the undeclared label '{}",
self.interner().resolve_expect(label_name)
));
}
} else {
self.jump_info
.last_mut()
Expand Down

0 comments on commit 61712da

Please sign in to comment.