Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SR-10236] Classes that inherit from themselves cause Xcode to max out the CPU #52636

Open
twostraws opened this issue Mar 29, 2019 · 3 comments
Assignees
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself

Comments

@twostraws
Copy link
Contributor

Previous ID SR-10236
Radar rdar://49434989
Original Reporter @twostraws
Type Bug
Environment

Xcode 10.2 on macOS 10.14.4.

Additional Detail from JIRA
Votes 1
Component/s Compiler
Labels Bug
Assignee @benlangmuir
Priority Medium

md5: e0e61270faebdea5437012736e153c79

Issue 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.

@benlangmuir
Copy link
Member

Reproduces when indexing-while-building is enabled.

$ swiftc -typecheck t.swift // OK
$ swiftc -typecheck t.swift -index-store-path /tmp/index // HANG

@benlangmuir
Copy link
Member

#23674

@benlangmuir
Copy link
Member

5.0: #23680
5.1: #23681

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself
Projects
None yet
Development

No branches or pull requests

2 participants