swiftlang / swift

The Swift Programming Language
https://swift.org
Apache License 2.0
66.81k stars 10.29k forks source link

[SR-3859] FixIts layerWithSession is incorrect #46444

Open swift-ci opened 7 years ago

swift-ci commented 7 years ago
Previous ID SR-3859
Radar rdar://problem/29882917
Original Reporter maury.markowitz@gmail.com (JIRA User)
Type Bug
Environment Xcode Version 8.2.1 (8C1002)
Additional Detail from JIRA | | | |------------------|-----------------| |Votes | 0 | |Component/s | Compiler | |Labels | Bug | |Assignee | None | |Priority | Medium | md5: 42c6f759d4551c37f2b95743cc6fe17b

Issue Description:

Another minor fixit issue:

Previously one would use AVCaptureVideoPreviewLayer.layerWithSession to set up a preview layer (for instance). Swift3 complains:

'layerWithSession' has been renamed to 'withSession(_🙂'

This is incorrect, there is no method called 'withSession'. The proper replacement is to use the init which takes the 'session' parameter.

(re-reporting here, this is really a compiler issue. it's #29882917 in the Apple Bug Reporter)

belkadan commented 7 years ago

I'm not seeing this on the Swift 3.1 branch. Maybe it's been fixed? MInd downloading an Xcode 8.3 beta and trying it out?

swift-ci commented 7 years ago

Comment by Maury Markowitz (JIRA)

Yeah, I don't see it any more either.