kevinlawler / kona

Open-source implementation of the K programming language
ISC License
1.36k stars 138 forks source link

Function only works the first time #554

Closed tavmem closed 4 years ago

tavmem commented 4 years ago

This bug was identified by adam.antonik@gmail.com

... defining deltas without parens works, but only the first time, 
the second variant works repeatedly.

 ds:{-':x}
  a: 1 2 3
  ds a
1 1
  ds a

  ds:{(-':x)}
  ds a
1 1
  ds a
1 1

This bug was introduced in the commit made on September 1, 2019 that attempted to fix issue #521: Recursive call overrides earlier data

tavmem commented 4 years ago

Confirmed that the cause of problem in issue #554 is due to fix for issue #521. Will disable "fix" for issue #521 till get proper "fix" for issue #521, since issue #554 addresses behavior that is more fundamental.