Uploaded image for project: 'Swift'
  1. Swift
  2. SR-5706

DispatchTime.distantFuture does not compare with other values of DispatchTime

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Medium
    • Resolution: Done
    • Component/s: libdispatch
    • Labels:
      None
    • Environment:

      Ubuntu, 16.04.3, Swift 4.0 snapshot 2017-08-15

      Description

      On Linux, DispatchTime.distantFuture does not fit in with the expected total ordering of DispatchTime values.

      import Dispatch
      let now = DispatchTime.now()
      print(now == .distantFuture)
      print(now > .distantFuture)
      print(now < .distantFuture)
      

      In any case, one expects one of these comparisons to be true.

      On macOS, the output is (false, false, true).

      On Linux, the output is (false, false, false).

        Attachments

          Activity

            People

            Assignee:
            ktopley-apple Kim Topley
            Reporter:
            glessard Guillaume Lessard
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: