4. Let parts be PartitionDurationFormatPattern(df, record).
...
7. For each { [[Type]], [[Value]] } part in parts, do
and in formatToParts it also has
d. If part.[[Unit]] is set, Perform ! CreateDataPropertyOrThrow(obj, "unit", part.[[Unit]]).
The problem is some of the Records in parts returned by PartitionDurationFormatPattern has
{ [[Type]], [[Value]] } while some other has { [[Type]], [[Value]], [[Unit]]}
So the current text imply it will match only those which has { [[Type]], [[Value]]} but not those has { [[Type]], [[Value]], [[Unit]]}
In the current spec text 1.4.3 Intl.DurationFormat.prototype.format ( duration ) 1.4.4 Intl.DurationFormat.prototype.formatToParts ( duration ) https://tc39.es/proposal-intl-duration-format/#sec-Intl.DurationFormat.prototype.format and https://tc39.es/proposal-intl-duration-format/#sec-Intl.DurationFormat.prototype.formatToParts
both have something like
and in formatToParts it also has
The problem is some of the Records in parts returned by PartitionDurationFormatPattern has { [[Type]], [[Value]] } while some other has { [[Type]], [[Value]], [[Unit]]}
So the current text imply it will match only those which has { [[Type]], [[Value]]} but not those has { [[Type]], [[Value]], [[Unit]]}
Following what is in https://tc39.es/ecma262/#sec-finalization-registry.prototype.unregister
I think the loop should be changed to
and also
@sffc @gibson042 @ryzokuken