Repository navigation
fix(compiler): support concrete function array elements - #1410
Merged
Lorenzobattistela merged 2 commits intoOct 8, 2026
Merged
Conversation
Lorenzobattistela
approved these changes
Oct 8, 2026
Collaborator
|
Review follow-up in #1426:
#1404's |
Contributor
Author
|
Thanks for the review follow-up in #1426. Understood: closed element types use a box, while open types stay rejected; Array.new still requires Data because it copies the value into leaves. I’ll preserve that boundary and won’t reopen this PR or broaden Array.new to function values. |
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 #1404.
Function values use the same one-word boxed representation regardless of their argument/result layouts. Let
lay_elaccept a function type alongside equality, without admitting an unresolved genericArray<T>.The regression consumes arrays of U32 closures, swaps a closure and calls the removed value, and consumes String closures capturing heap-backed strings. Guide wording states the supported element type and preserves the Data-only get/clone boundary.
Verification (Linux, Bun 1.3.13, clang 22.1.8):
an open Array element type.49,19,a!b!for the permanent regression.bun gates/repo.ts: PASS 50/50; permanent caps unchanged.The report's
Array.new(U32 -> U32, ...)call independently hits the existing Data-bound argument check on current upstream, so the regression constructs affine closure cells directly; it does not change the source checker or relax the Data boundary. No mini-cluster or physical GPU run is claimed.