Multiple trailing closures with default nil arguments

Hi,

To use the code from SE-0279:

Code Block swift
func transition(with view: View,
duration: TimeInterval,
animations: (() -> Void)? = nil,
completion: (() -> Void)? = nil) {
}
transition(with: view, duration: 2.0) {
//executes as completion
}
/*
//doesn't work
transition(with: 1)
    animations: {
        ...
    }
*/

This calls the completion: method without providing a label. But as far as I see there's no way of only passing animations: without a completion:...

is this intended?
.*
Code Block swift
transition(with: view, duration: 2.0) animations: { //doesn't work }

Multiple trailing closures with default nil arguments
 
 
Q