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-3809] errors out on the addOperation() for OperationQueue #4423

Closed
swift-ci opened this issue Jan 31, 2017 · 1 comment
Closed

[SR-3809] errors out on the addOperation() for OperationQueue #4423

swift-ci opened this issue Jan 31, 2017 · 1 comment

Comments

@swift-ci
Copy link
Contributor

Previous ID SR-3809
Radar None
Original Reporter adawra (JIRA User)
Type Bug
Status Resolved
Resolution Invalid
Additional Detail from JIRA
Votes 0
Component/s Foundation
Labels Bug
Assignee None
Priority Medium

md5: 060add2d841f0e62e44949dca074d118

cloned from:

  • SR-3561 can't use initializer with default argument to define a lazy var

Issue Description:

Sample Code:

class MyClass {

   var operationQueue: OperationQueue
   operationQueue.addOperation(self)

}

The error we get:

Error: 'addOperation' has been renamed to 'add(_:)'
    operationQueue.addOperation(self)
                  ^~~~~~~~~

The code doesn't work if the suggested method 'add(_🙂' is added instead of 'addOperation' either

@belkadan
Copy link

belkadan commented Feb 1, 2017

I'm not sure what you expect here. self isn't an Operation.

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@shahmishal shahmishal transferred this issue from apple/swift May 5, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants