[swift-users] Ambiguous parsing of `return`
clattner at apple.com
Tue Jun 7 14:35:08 CDT 2016
> On Jun 6, 2016, at 11:50 AM, Jens Alfke via swift-users <swift-users at swift.org> wrote:
>> On Jun 6, 2016, at 11:46 AM, Daniel Dunbar <daniel_dunbar at apple.com <mailto:daniel_dunbar at apple.com>> wrote:
>> Did you try an example? Swift warns about this for this very reason:
> I don’t get that warning with the latest Xcode 7.3.1 (Swift 2.3 IIRC.) Perhaps you’re using Swift 3? Outside of this community I don’t think many people are using Swift 3 yet.
Yes, this is a new warning produced by Swift 3, specifically introduced to address this issue.
file.swift:3:5: warning: expression following 'return' is treated as an argument of the 'return'
file.swift:3:5: note: indent the expression to silence this warning
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the swift-users