Avatar
norio_nomura 12/6/2018 1:20 AM
Swift 5、@autoclosureで受け取ったクロージャを@autoclosureなパラメータへ渡せなくなってる。 $ docker run --privileged -it --rm norionomura/swift:5020181204a swift Welcome to Swift version 5.0-dev (LLVM 9a8bf9ce12, Clang eba26b8d1c, Swift b74d54a27c). Type :help for assistance. 1> func takeAutoclosure(_ closure: @autoclosure () -> String) { 2. takeAutoclosure(closure) 3. } error: repl.swift:2:21: error: function produces expected type 'String'; did you mean to call it with '()'? takeAutoclosure(closure) ^~~~~~~ ()