Properly solve capture set during box adaptation#25902
Merged
Linyxus merged 3 commits intoscala:mainfrom Apr 27, 2026
Merged
Conversation
Contributor
|
Seems stdlib is not compiling with this change anymore. Can we fix it? |
Contributor
Author
|
Yes, I was planning to look into that but got distracted. Will work on it. |
Needs a type ascription on an `Iterable.empty`.
Contributor
|
I think I have a fix for Iterable. |
odersky
approved these changes
Apr 26, 2026
odersky
approved these changes
Apr 26, 2026
Contributor
|
Seems I can't approve this anymore since I added a commit? |
natsukagami
approved these changes
Apr 27, 2026
noti0na1
reviewed
Apr 27, 2026
Comment on lines
+2
to
+5
| 13 | val error = make[File^{file}](fun, file) // error, which is expected | ||
| | ^^^ | ||
| | Found: File^ ->{file} Unit | ||
| | Required: File^{file} -> Unit |
Member
There was a problem hiding this comment.
Why does the error point to fun? It looks confusing, as fun is indeed a pure function.
Contributor
There was a problem hiding this comment.
It's because the box-adapted version of fun is of the Found: type. I agree it's confusing. Maybe we can make an error note for capabilities added to capture sets through box adapation?
Contributor
Author
There was a problem hiding this comment.
Agreed. An error note will be quite desirable.
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.
Fixes #25863.
How much have you relied on LLM-based tools in this contribution?
Extensively, for emotional support.
How was the solution tested?