diff --git a/parser/src/parser.rs b/parser/src/parser.rs index ced5d9b..41945f2 100644 --- a/parser/src/parser.rs +++ b/parser/src/parser.rs @@ -312,7 +312,7 @@ with (0 as a, 1 as b,): pass #[test] fn test_dict_containing_spread() { - let parse_ast = parse_expression(r#"{"k": "v", **d}"#, "").unwrap(); + let parse_ast = parse_expression(r#"{"a": "b", **c, "d": "e"}"#, "").unwrap(); insta::assert_debug_snapshot!(parse_ast); } } diff --git a/parser/src/snapshots/rustpython_parser__parser__tests__dict_containing_spread.snap b/parser/src/snapshots/rustpython_parser__parser__tests__dict_containing_spread.snap index 29eb084..212f737 100644 --- a/parser/src/snapshots/rustpython_parser__parser__tests__dict_containing_spread.snap +++ b/parser/src/snapshots/rustpython_parser__parser__tests__dict_containing_spread.snap @@ -10,7 +10,7 @@ Located { end_location: Some( Location { row: 1, - column: 15, + column: 25, }, ), custom: (), @@ -31,13 +31,34 @@ Located { custom: (), node: Constant { value: Str( - "k", + "a", ), kind: None, }, }, ), None, + Some( + Located { + location: Location { + row: 1, + column: 16, + }, + end_location: Some( + Location { + row: 1, + column: 19, + }, + ), + custom: (), + node: Constant { + value: Str( + "d", + ), + kind: None, + }, + }, + ), ], values: [ Located { @@ -54,7 +75,7 @@ Located { custom: (), node: Constant { value: Str( - "v", + "b", ), kind: None, }, @@ -72,10 +93,29 @@ Located { ), custom: (), node: Name { - id: "d", + id: "c", ctx: Load, }, }, + Located { + location: Location { + row: 1, + column: 21, + }, + end_location: Some( + Location { + row: 1, + column: 24, + }, + ), + custom: (), + node: Constant { + value: Str( + "e", + ), + kind: None, + }, + }, ], }, }