fix: array pattern matching

This commit is contained in:
Shunsuke Shibayama 2023-08-27 20:29:40 +09:00
parent 5a6cea0df1
commit 952e6ccd2e
5 changed files with 121 additions and 2 deletions

View file

@ -290,6 +290,13 @@ impl PyCodeGenerator {
self.cur_block().lasti
}
#[inline]
#[allow(dead_code)]
fn debug_print(&mut self, value: impl Into<ValueObj>) {
self.emit_load_const(value);
self.emit_print_expr();
}
#[inline]
#[allow(dead_code)]
fn emit_print_expr(&mut self) {

View file

@ -252,8 +252,8 @@ impl ASTLowerer {
arr.l_sqbr,
arr.r_sqbr,
Type::Failure,
len,
elem,
len,
)))
}
ast::Array::Normal(arr) => {