Skip to content

[AutoDiff] Allow closure differentiation when used as default arg val #78373

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 20, 2025

Conversation

kovdan01
Copy link
Contributor

@kovdan01 kovdan01 commented Dec 27, 2024

If the default argument generator (and, consequently, the function taking
this default argument) has public visibility, it's OK to have a closure
(which always has private visibility) as the default value of the argument.

@kovdan01
Copy link
Contributor Author

Note that the PR contains 2 commits: with changes from #77615 (which this depends on) and with actual changes. After #77615 gets merged, this will be rebased.

@kovdan01
Copy link
Contributor Author

Tagging @asl @JaapWijnen @rxwei

@kovdan01 kovdan01 marked this pull request as ready for review December 27, 2024 21:16
@asl
Copy link
Contributor

asl commented Dec 30, 2024

@swift-ci please test

1 similar comment
@asl
Copy link
Contributor

asl commented Jan 13, 2025

@swift-ci please test

@kovdan01
Copy link
Contributor Author

Would be glad to see feedback from everyone interested

2 similar comments
@kovdan01
Copy link
Contributor Author

Would be glad to see feedback from everyone interested

@kovdan01
Copy link
Contributor Author

kovdan01 commented Feb 4, 2025

Would be glad to see feedback from everyone interested

@asl asl added the AutoDiff label Feb 13, 2025
@asl
Copy link
Contributor

asl commented Feb 13, 2025

This PR LGTM after #77615 is merged

If the default argument generator (and, consequently, the function taking
this default argument) has public visibility, it's OK to have a closure
(which always has private visibility) as the default value of the argument.
@kovdan01 kovdan01 force-pushed the implicit-diff-closure-on-top-77615 branch from 6cdff4f to 40e5eb2 Compare February 18, 2025 08:47
@kovdan01
Copy link
Contributor Author

@asl I've rebased since #77615 got merged, please re-trigger the CI

@asl
Copy link
Contributor

asl commented Feb 18, 2025

@swift-ci please test

@asl
Copy link
Contributor

asl commented Feb 18, 2025

@swift-ci please test Linux

1 similar comment
@asl
Copy link
Contributor

asl commented Feb 20, 2025

@swift-ci please test Linux

@asl asl merged commit 83a028d into swiftlang:main Feb 20, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants