Avatar
Avatar
omochimetaru
@swift-5.2.5 @swift-5.3.3 func animate( animations: @escaping () -> Void, completion: ((Bool) -> Void)? = nil ) { print("animations") animations() print("completion") completion?(true) } animate { print(1) }
exit status: 1 with <stdin>:11:16: error: missing argument for parameter 'animations' in call animate { print(1) } ^ (animations: <#() -> Void#>) <stdin>:1:14: note: 'animate(animations:completion:)' declared here func animate( ^ <stdin>:11:17: error: cannot convert value of type '() -> ()' to expected argument type '((Bool) -> Void)?' animate { print(1) } ^