[JExtract] Bridge closures with UnsafeRawBufferPointer parameter#282
Merged
Conversation
First step to bridging closures with conversions.
rintaro
commented
Jun 23, 2025
| ) | ||
| } | ||
|
|
||
| func lowerClosureParameter( |
Member
Author
There was a problem hiding this comment.
It's unfortunate that we now have another lower/translate function for closure parameters (in addition to regular parameters, and results), and probably we'd add more for closure result conversions. But this works for now, and we can consolidate them after we implement more types, and find common logics among them.
Collaborator
There was a problem hiding this comment.
Yeah, but still managable... agreed on converging later if we find ways to do so 👍
ktoso
reviewed
Jun 24, 2025
|
|
||
| closure.statements = CodeBlockItemListSyntax { | ||
| body.map { | ||
| $0.with(\.leadingTrivia, [.newlines(1), .spaces(4)]) |
Collaborator
There was a problem hiding this comment.
Oh I didn't know about .newlines, that's nice
ktoso
approved these changes
Jun 24, 2025
Collaborator
|
Happy to merge this now and I'll finish up landing the commands and test infra fixes today on top of this 👍 Should have not impact really on that ongoing work. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
First step to bridging closures with conversions.
E.g.
is lowered to:
then translated to: