nakala-lang / nakala

A dynamic programming language designed to feel familiar and be fun to use, written in Rust
MIT License
11 stars 1 forks source link

Function params with the same name as defined variables cause the function call to fail #1

Closed reaganmcf closed 3 years ago

reaganmcf commented 3 years ago

Running the following example with the cli gives weird behavior. It has to do with the engine renaming parameters in the function call when they share the same name as an already defined variable.

  1. let x = 100
  2. fn test(x,y) { x + y }
  3. call test(1,1)

The following error shows up

Screen Shot 2021-07-31 at 7 37 19 PM