I have the following function in a class:
/// Returns the weather conditions at the given location.
/// - parameter for: A location on the Earth's surface.
/// - returns: If found, the `WeatherConditions` at the supplied location otherwise nil.
public func conditions(for location: Location) -> WeatherConditions? {
return nil // The actual code is not important to the question.
}
which is called as follows let myWeather = conditions(for: myLocation)
.
The code works fine, the question is about the documentation. The image below is what is seen in the 'quick help' window for the conditions
function. Given that the user of the function must use the external argument label (for
) and also that I have explicitly documented that label, shouldn't the parameters line in the quick help window read Parameters for
and not Parameters location
?
Is this a bug in Xcode or is there a reason the (internal) parameter name is displayed and not the external argument label?