unexpected non-void return value in void function in new Swift class <p>I'm just starting to learn about Object Oriented, and I've begun writing up a user class that has a method for calculating the user's distance from an object. It looks like this:</p> <pre><code>class User{ var searchRadius = Int() var favorites : [String] = [] var photo = String() var currentLocation = CLLocation() func calculateDistance(location: CLLocation){ let distance = self.currentLocation.distanceFromLocation(location)*0.000621371 return distance //Error returns on this line } } </code></pre> <p>At the line marked above, I get the following error:</p> <pre><code>(!) Unexpected non-void return value in void function </code></pre> <p>I've looked elsewhere for a solution, but can't seem to find anything that applies to this instance. I've used the distanceFromLocation code elsewhere, and it's worked okay, so I'm not sure what's different about the usage in this case.</p> <p>Thanks for any help!</p>