dict patterns prolly work? one-level nested patterns work
This commit is contained in:
parent
45d2e7e742
commit
04c96c9edb
|
@ -559,7 +559,7 @@ impl Compiler {
|
|||
let before_load_dict_idx = self.len();
|
||||
self.emit_byte(0xff);
|
||||
let mut jump_idxes = vec![];
|
||||
let dict_stack_pos = self.stack_depth;
|
||||
let dict_stack_pos = self.stack_depth - 1;
|
||||
for pair in pairs {
|
||||
let (PairPattern(key, pattern), _) = pair else {
|
||||
unreachable!()
|
||||
|
|
|
@ -74,8 +74,8 @@ pub fn run(src: &'static str) {
|
|||
pub fn main() {
|
||||
env::set_var("RUST_BACKTRACE", "1");
|
||||
let src = "
|
||||
let #{:a x} = #{:a 1}
|
||||
x
|
||||
let #{a, :b #{c}} = #{:a 1, :b #{:c 3}}
|
||||
[a, c]
|
||||
";
|
||||
run(src);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user