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

Classes that inherit from themselves cause Xcode to max out the CPU

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Medium
    • Resolution: Unresolved
    • Component/s: Compiler
    • Labels:
      None
    • Environment:

      Xcode 10.2 on macOS 10.14.4.

      Description

      Code like this is causing issues when compiled using Xcode:

      class A: B { }
      class B: A { }
      

      When run through swiftc on the command line it errors out immediately, saying "A inherits from itself", but in Xcode the Swift compiler carries on running in the background. As far as I can see, the background Swift compilation continues to sit at 100% until killed.

      I tested this in a new macOS terminal project with no other code, and also an iOS Single View App template project.

        Attachments

          Activity

            People

            • Assignee:
              benlangmuir Ben Langmuir
              Reporter:
              twostraws Paul Hudson
            • Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated: