Skip to content

Type checks for functions arguments in strict mode #6

@antonmedv

Description

@antonmedv

Currently there is no type checks for function arguments:

https://github.com/antonmedv/expr/blob/425d51925274929795656c4ed3065079d68551ad/type.go#L150-L163

Will be cool to add those. Use reflect for getting function arguments and compare with node's arguments types. Gather types at line 152, get f arguments in line 159 and check.

Same for builtins:

https://github.com/antonmedv/expr/blob/425d51925274929795656c4ed3065079d68551ad/type.go#L143

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions