Commit Graph

3 Commits

Author SHA1 Message Date
Max Desiatov
29fa1c0806 test: Disable test/stdlib/Duration.swift on 32bit platforms (#67469)
128-bit types are not provided by LLVM for 32-bit targets.
2023-07-22 22:48:30 +01:00
Stephen Canon
185820a148 Fix sign of fractional units in Duration initializers from Double. (#66582)
* Fix sign of fractional units in Duration initializers from Double.

When separating a double duration into integral and fractional parts, we got the sign wrong. This fixes that bug.

* Fixup variable name.
2023-06-13 08:46:46 -04:00
Stephen Canon
db0a7287a5 Rework the .seconds, .milliseconds, and .microseconds constructors to preserve exact values (#66111)
When constructing a Duration from Double, we should do it in such a way that exact integer inputs are preserved exactly, so long as they are represented as a Duration. This was not previously the case. Now it is.
2023-05-24 23:07:17 -04:00