kin-lang / kin

The Kin Programming Language ( Write computer programs in Kinyarwanda - native language for Rwandans )
https://kinlang.dev
MIT License
209 stars 11 forks source link

[Bug] : number of arguments can be less than number of parameters. #63

Closed pacifiquem closed 8 months ago

pacifiquem commented 8 months ago

We don't check if number of arguments to functions are equal to number of parameters of that function.

this leads to errors like Error reading file: Cannot read properties of undefined (reading 'type').

How to fix this

in globals.ts inside runtime folder, always check if args.length == number of arguments the native function has to receive

must be fixed in expressions.ts check if arguments, are equal to fn.parameters.length