Skip to content

Add arg count checking for fn calls #211

@pmonks

Description

@pmonks

It might be nice to add arg count checking when too many args are provided in a function call.

e.g. the following:

user => (defn sq [x] (* x x))
<inst pixie.stdlib.Var>
user => (sq 4 5)
16

should result in an exception of some kind.

Note that providing too few args to a function is checked:

user => (sq)
Error:  in <unknown> at 11:1
(sq)
^
in pixie function sq

RuntimeException: Invalid number of arguments 0 for function 'sq'. Expected 1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions