rescript-compiler icon indicating copy to clipboard operation
rescript-compiler copied to clipboard

Better output for record duplication

Open cometkim opened this issue 9 months ago • 0 comments

As described in https://github.com/rescript-lang/rescript/pull/7043#issue-2537532373

record duplication currently emits:

let newrecord = { ...obj };
newrecord.field = value;

It should be:

{ ...obj, field: value };

cometkim avatar Mar 06 '25 10:03 cometkim