Avatar
Avatar
Iceman
@swift-5.9.2 typealias Foo = () -> Void typealias Bar = @escaping () -> Void typealias Baz = @MainActor @escaping () -> Void print(MemoryLayout<Foo>.size) print(MemoryLayout<Bar>.size) print(MemoryLayout<Baz>.size)
exit status: 1 with <stdin>:2:17: error: @escaping attribute may only be used in function parameter position typealias Bar = @escaping () -> Void ^~~~~~~~~~ <stdin>:3:28: error: @escaping attribute may only be used in function parameter position typealias Baz = @MainActor @escaping () -> Void ^~~~~~~~~~