Skip to content

[CS] Make sure macro arguments go through coerceCallArguments#80583

Merged
hamishknight merged 1 commit into
swiftlang:mainfrom
hamishknight:macro-arg-apply
Apr 8, 2025
Merged

[CS] Make sure macro arguments go through coerceCallArguments#80583
hamishknight merged 1 commit into
swiftlang:mainfrom
hamishknight:macro-arg-apply

Conversation

@hamishknight

Copy link
Copy Markdown
Contributor

Previously we would avoid rewriting the arguments in CSApply, but that can result in incorrect behavior in MiscDiagnostics passes, e.g incorrectly treating all closure arguments as escaping. Make sure we rewrite the arguments as we would in regular type-checking.

rdar://148665502
Resolves #80561

@hamishknight hamishknight force-pushed the macro-arg-apply branch 2 times, most recently from ae264de to 9c6a1c6 Compare April 7, 2025 15:28
Previously we would avoid rewriting the arguments in CSApply, but
that can result in incorrect behavior in MiscDiagnostics passes, e.g
incorrectly treating all closure arguments as escaping. Make sure
we rewrite the arguments as we would in regular type-checking.

rdar://148665502
@hamishknight

Copy link
Copy Markdown
Contributor Author

@swift-ci please test

@hamishknight

Copy link
Copy Markdown
Contributor Author

@swift-ci please test source compatibility

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unexpected warnings when capturing self in closures passed to macros

3 participants