[swift-users] initializer with alternative
Jan E. Schotsman
jeschot at xs4all.nl
Wed Jul 27 04:37:52 CDT 2016
On Jul 26, 2016, at 4:15 PM, Doug Hill wrote:
> I'm guessing your best bet is going with the separate function to
> handle this. Or make it a type method.
Of course. I didn't think of the type method approach.
> // 'self' used inside 'catch' block reachable from self.init call
> This might be a bug in the compiler since the error message isn't
> correct; self isn't referenced in the catch block. Also the error
> message on the closing brace is puzzling.
I got this message too inside an if err {} block.
I don't think I'll file a bug as this is probably a rare case.
Jan E.
More information about the swift-users
mailing list