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 {
19861986 Ok ( ( ) )
19871987 }
19881988
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 < ( ) > {
19901994 let mut size = 0 ;
19911995
19921996 let ( packed_values, unpacked_values) = values. split_at ( keys. len ( ) ) ;
19931997 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+ }
19952001 self . compile_expression ( value) ?;
19962002 size += 1 ;
19972003 }
Original file line number Diff line number Diff line change @@ -887,7 +887,9 @@ impl SymbolTableBuilder {
887887 Dict { keys, values } => {
888888 let ( packed, unpacked) = values. split_at ( keys. len ( ) ) ;
889889 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+ }
891893 self . scan_expression ( value, context) ?;
892894 }
893895 for value in unpacked {
You can’t perform that action at this time.
0 commit comments