Files
scriptc/docs/content/limitations/language-features/function-values.mdx
T
Malte UblandClaude Opus 5.5 73bd0b53c3 Pass rest-parameter functions into slots with fixed parameters
A typed rest-parameter function passed where a function with fixed parameters is expected (`log(...m: string[])` into `(m: string) => void`) was refused. The function adapter now packs the slot's remaining arguments into the rest array, and the value check admits the function wherever that adapter fits. A nested function declaration with a typed rest parameter becomes a value with its own typed-rest signature, converted at each use.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-19 21:23:54 -07:00

5 lines
552 B
Plaintext

- **Function values:** Immutable aliases of overloaded program functions retain per-call overload resolution and identity.
A function stored in a slot with a different signature remains the same function for equality, array searches, `length`, and own properties.
Typed rest-parameter functions can be stored and called indirectly, including through a slot with fixed parameters, where the slot's arguments arrive in the rest array.
Builtin function values have API-specific restrictions; see [Builtin function values](#builtin-function-values).