Skip to content

Method call operator not working with variadic arguments #58

@daniele-rapagnani

Description

@daniele-rapagnani

If a method assigned to the call operator of an object accepts variadic arguments the operator will not work.

let functor = {
    value = 10,
    [object.symbols.callOperator] = |...args| -> {
        io.print("Result:", this.value + args[0] + args[1]);
    }
};

functor(2, 5); // Should output 17

Metadata

Metadata

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions