Good question and good thought! I believe the answer is yes, this will work as 
intended, but I'd like to get someone more versed in SIL than me to verify 
that. Andy?

Jordan


> On Dec 13, 2017, at 01:28, Jens Persson via swift-users 
> <swift-users@swift.org> wrote:
> 
> There are no restrictions on the type of the first argument to 
> withExtendedLiftetime, even though it makes sense only for reference types.
> 
> So both the below variants will compile, and my question is if the first one 
> will work as expected (extending the lifetime of both a and b) or if the 
> second variant must be used instead.
> 
> 1:
> withExtendedLifetime((a, b)) {
>     ...
> }
> 
> 2:
> withExtendedLifetime(a) {
>     withExtendedLifetime(b) {
>         ...
>     }
> }
> 
> /Jens
> 
> _______________________________________________
> swift-users mailing list
> swift-users@swift.org
> https://lists.swift.org/mailman/listinfo/swift-users

_______________________________________________
swift-users mailing list
swift-users@swift.org
https://lists.swift.org/mailman/listinfo/swift-users

Reply via email to