We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 394ca93 commit 9b35205Copy full SHA for 9b35205
jscomp/syntax/src/res_core.ml
@@ -3947,11 +3947,11 @@ and parseDictExpr ~startPos p =
3947
~f:parseDictExprRow p
3948
in
3949
let loc = mkLoc startPos p.prevEndPos in
3950
- let toKeyValuePair recordItem =
+ let toKeyValuePair (recordItem: (Longident.t Location.loc * Parsetree.expression)) =
3951
match recordItem with
3952
- | {Location.txt = Longident.Lident key}, valueExpr ->
+ | {Location.txt = Longident.Lident key; loc}, valueExpr ->
3953
Some
3954
- (Ast_helper.Exp.tuple ~loc
+ (Ast_helper.Exp.tuple ~loc:(mkLoc loc.loc_start valueExpr.pexp_loc.loc_end)
3955
[Ast_helper.Exp.constant ~loc (Pconst_string (key, None)); valueExpr])
3956
| _ -> None
3957
0 commit comments