Add MAX_PARAMETERS constant set to 16 and extend VM bytecode instructions CODE_CALL_11 through CODE_CALL_16 to support the new limit. Introduce compile-time error messages when parameter or argument count exceeds 16 in function definitions, method declarations, subscript calls, and regular method calls. Add new native fiber call stubs fn_call9 through fn_call16 and register them in the core initialization. Include comprehensive test coverage for 9-16 parameter functions and methods, plus error tests for exceeding the limit in all contexts.
5 lines
118 B
Plaintext
5 lines
118 B
Plaintext
class Foo {
|
|
// 17 parameters.
|
|
method(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q) { "!" } // expect error
|
|
}
|