This Swift 3 code worked until XCode 8 beta 3:
let calendar = Calendar.current
let anchorComponents = calendar.components([Calendar.Unit.day, Calendar.Unit.m
In the Swift version shipped with Xcode 8 beta 4, components has been renamed to dateComponents.
Note: to make the call simpler, you can omit the Calendar.Component prefix.
let anchorComponents = calendar.dateComponents([.day, .month, .year, .hour], from: self)
The error message you got is a bit misleading, I guess the compiler was struggling with type inference.