-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Closed
Labels
bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.A deviation from expected or documented behavior. Also: expected but undesirable behavior.compilerThe Swift compiler itselfThe Swift compiler itselfswift macroFeature → declarations: Swift `macro` declarationsFeature → declarations: Swift `macro` declarationstype checkerArea → compiler: Semantic analysisArea → compiler: Semantic analysis
Description
#80583 broke source compatibility for uses of noasync
declarations in closure macro arguments passed to macros that have async
function parameters:
@available(*, noasync)
func foo() {}
@freestanding(expression)
macro M(_ fn: () async -> Void) = #externalMacro(module: "", type: "")
#M {
foo() // Legal in Swift 6, became an error under Swift 6 mode
}
We ought to downgrade the diagnostic to a warning for macro arguments until we get a new language mode.
Metadata
Metadata
Assignees
Labels
bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.A deviation from expected or documented behavior. Also: expected but undesirable behavior.compilerThe Swift compiler itselfThe Swift compiler itselfswift macroFeature → declarations: Swift `macro` declarationsFeature → declarations: Swift `macro` declarationstype checkerArea → compiler: Semantic analysisArea → compiler: Semantic analysis