Skip to content

Type the typed-arguments parameter list as IrParam[] - #2283

Merged
ctate merged 1 commit into
mainfrom
ctate/type-typed-arguments-7bdc5f
Oct 26, 2026
Merged

ctate merged 1 commit into
mainfrom
ctate/type-typed-arguments-7bdc5f

Conversation

@ctate

@ctate ctate commented Oct 26, 2026

Copy link
Copy Markdown
Collaborator
  • The native compiler built variadic wrappers that forward arguments without parameters and stopped with SC9001 on corpus programs 6380, 6381, 6382 and 6384.
  • declareTypedArguments now takes the IrParam[] list it appends to, so the native compiler appends to the caller's list instead of a converted copy; all five 6380–6384 programs build and match Node.

declareTypedArguments appends the hidden positional slots of a
typed-arguments function expression to the parameter list that
declareParams returns. Its parameter was typed
`{ localId: string; name: string; type: IrType }[]`, while the list is an
`IrParam[]` (which also declares `owned?: true`). The native compiler
passes an array whose element type has another layout as a converted copy,
so the slots were appended to the copy and the lifted function kept no
parameters. Building tests/corpus/6380 to 6384 (variadic wrappers that
forward `arguments`) with the native compiler then stopped with SC9001
"closure ...: func type does not match target signature" in 6380, 6381,
6382 and 6384.

The parameter is now typed `IrParam[]`, the type of the list the caller
passes, and the native compiler builds all five programs with output that
matches Node.
@vercel

vercel Bot commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
scriptc Ready Ready Preview, v0 Oct 26, 2026 12:13am UTC

@ctate
ctate merged commit fe48f8e into main Oct 26, 2026
126 of 128 checks passed
@ctate
ctate deleted the ctate/type-typed-arguments-7bdc5f branch October 26, 2026 01:05

This branch was successfully deployed

1 active deployment
Preview — ebf36f94 Deployed Oct 26, 2026 by vercel[bot]
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.

1 participant