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

Compiler bug in Xcode 10.2 for Enums with Associated Values

    XMLWordPrintable

    Details

      Description

      This code produces very odd results in release builds in Xcode 10.2 with [-O] Optimization Level. (See attached screenshot).

      https://gist.github.com/ullstrm/8894f52c30e6eb858c208ebcfaf7f77c

       

      My theory is that it has something to do with the fact that the AssociatedValue is a ObjC-enum, since it works with a custom Enum as Associated Value.

        Attachments

          Activity

            People

            Assignee:
            Unassigned
            Reporter:
            ullstrm J. Ullstrm
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: