Avatar
Avatar
omochimetaru
@swift-5.9.2 @swift-5.10.1 public final class Function<R, each A> { public init( _ body: @escaping (repeat each A) -> R ) { self.body = body } public var body: (repeat each A) -> R public func callAsFunction(_ args: repeat each A) -> R { body(repeat each args) } }
exit status: 1 with <stdin>:5:19: error: type of expression is ambiguous without a type annotation self.body = body ~~~~~~~~~~^~~~~~ <stdin>:11:13: error: missing argument for parameter #1 in call body(repeat each args) ^ <#repeat each A#>, <stdin>:8:16: note: 'body' declared here public var body: (repeat each A) -> R ^