I just tried converting my project to Swift 3 in the Xcode 8 beta 1 release. Most things worked - but this one I have no idea how to get it to work.
Here's a snippet I took from a playground:
let calendar = Calendar.current()
var interval = TimeInterval(0)
var startOfTheWeek: Date = Date()
let startTime = Date()
calendar.range(of: .weekOfMonth, start: &startOfTheWeek, interval: &interval, for: startTime)
The compiler complains that
Cannot pass immutable value of type 'NSDate?' as inout argument
It’s complaining on
startOfTheWeek
which is mutable...Any thoughts?