Semantic Diff

#9232 Start a recursive array record as an empty array

1 commit

85853119fd52b3ec4ef13f8726303167df7c0ac3..pr-9232

628013adf · cknitt + Claude · Nov 05, 2026, 05:55 UTC

Start a recursive array record as an empty array

Fable review: a recursive value starts as an empty placeholder that is filled in afterwards, and the placeholder of every record was {}, so a let rec of an array record stayed an object. It is now [] for an array record. An array record in an arrow body also no longer gets the parentheses an object literal needs.

modifiedJS recursive array record

type rec cell = {@as("0") value: int, @as("1") next: cell}let rec cell = {value: 1, next: cell}
js
Before
After
let cell = {};let cell = [];cell[0] = 1;cell[0] = 1;cell[1] = cell;cell[1] = cell;