Skip to content

Commit

Permalink
Editorial: Assert CreateTimeDurationRecord is called with valid durat…
Browse files Browse the repository at this point in the history
…ion values

All callers to CreateTimeDurationRecord pass valid duration values, so
we can assert this in CreateTimeDurationRecord instead of throwing an
error.
  • Loading branch information
anba committed Jun 19, 2023
1 parent bbeeee4 commit d11b2de
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion spec/duration.html
Original file line number Diff line number Diff line change
Expand Up @@ -889,7 +889,7 @@ <h1>
<dd>It returns a Time Duration Record.</dd>
</dl>
<emu-alg>
1. If ! IsValidDuration(0, 0, 0, _days_, _hours_, _minutes_, _seconds_, _milliseconds_, _microseconds_, _nanoseconds_) is *false*, throw a *RangeError* exception.
1. Assert: ! IsValidDuration(0, 0, 0, _days_, _hours_, _minutes_, _seconds_, _milliseconds_, _microseconds_, _nanoseconds_) is *true*.
1. Return the Record {
[[Days]]: ℝ(𝔽(_days_)),
[[Hours]]: ℝ(𝔽(_hours_)),
Expand Down

0 comments on commit d11b2de

Please sign in to comment.