File tree Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -1986,12 +1986,18 @@ impl Compiler {
1986
1986
Ok ( ( ) )
1987
1987
}
1988
1988
1989
- fn compile_dict ( & mut self , keys : & [ ast:: Expr ] , values : & [ ast:: Expr ] ) -> CompileResult < ( ) > {
1989
+ fn compile_dict (
1990
+ & mut self ,
1991
+ keys : & [ Option < ast:: Expr > ] ,
1992
+ values : & [ ast:: Expr ] ,
1993
+ ) -> CompileResult < ( ) > {
1990
1994
let mut size = 0 ;
1991
1995
1992
1996
let ( packed_values, unpacked_values) = values. split_at ( keys. len ( ) ) ;
1993
1997
for ( key, value) in keys. iter ( ) . zip ( packed_values) {
1994
- self . compile_expression ( key) ?;
1998
+ if let Some ( key) = key {
1999
+ self . compile_expression ( key) ?;
2000
+ }
1995
2001
self . compile_expression ( value) ?;
1996
2002
size += 1 ;
1997
2003
}
Original file line number Diff line number Diff line change @@ -887,7 +887,9 @@ impl SymbolTableBuilder {
887
887
Dict { keys, values } => {
888
888
let ( packed, unpacked) = values. split_at ( keys. len ( ) ) ;
889
889
for ( key, value) in keys. iter ( ) . zip ( packed) {
890
- self . scan_expression ( key, context) ?;
890
+ if let Some ( key) = key {
891
+ self . scan_expression ( key, context) ?;
892
+ }
891
893
self . scan_expression ( value, context) ?;
892
894
}
893
895
for value in unpacked {
You can’t perform that action at this time.
0 commit comments