Avatar
Avatar
omochimetaru
@swift-main @swift-6.0.3 @swift-5.10.1 let f: @MainActor (Int) async -> Void = { @MainActor (a: Int) in print(a) }
exit status: 1 with <stdin>:1:44: warning: extraneous whitespace between attribute name and '('; this is an error in the Swift 6 language mode 1 | let f: @MainActor (Int) async -> Void = { @MainActor (a: Int) in print(a) } | `- warning: extraneous whitespace between attribute name and '('; this is an error in the Swift 6 language mode 2 | <stdin>:1:72: error: cannot find 'a' in scope 1 | let f: @MainActor (Int) async -> Void = { @MainActor (a: Int) in print(a) } | `- error: cannot find 'a' in scope 2 | <stdin>:1:41: error: contextual type for closure argument list expects 1 argument, which cannot be implicitly ignored 1 | let f: @MainActor (Int) async -> Void = { @MainActor (a: Int) in print(a) } | `- error: contextual type for closure argument list expects 1 argument, which cannot be implicitly ignored 2 |