> On 3 Mar 2015, at 22:42, Juanjo Conti <jjco...@carouselapps.com> wrote: > > Ok, first of all thanks all for the replies. > > I'm trying to solve it this an util class method: > > import Cocoa > > class Utils: NSObject { > > class func isValidUrl(url: NSURL?) { > var lower = url?.scheme?.lowercaseString > return lower == "http" || lower == "https" > } > } > Sadly I'm getting and error in the return line that I can't interprete: > Cannot invoke == with argument list of type `($T4, $T8)` >
> What I'm doing wrong? > Using Swift :) > Thanks, If you use the latest beta you get a slightly better error message “Bool is not convertible to ()”, that is one thing that version has fixed, the $T3 variables in error messages, which is a good step forward. That error message might lead you to realise what I didn’t from the original error message either, that your function definition is missing “->Bool” to give it a return type. Would still prefer an error message which directly said ‘Incorrect return type” but at least this one gave enough hints to figure it out. _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com