andmarti1424 / sc-im

sc-im - Spreadsheet Calculator Improvised -- An ncurses spreadsheet program for terminal
Other
4.88k stars 208 forks source link

Spurious "Circular reference" with same cell address, different sheet #903

Open DHMike57 opened 1 month ago

DHMike57 commented 1 month ago

Opening the file below and then changing the value of A0 in Sheet2 generates a "Circular reference" error and deletes entry in {"Sheet1"}!A1

file test.sc

newsheet "Sheet1"
newsheet "Sheet2"
movetosheet "Sheet1"
let A0 = {"Sheet2"}!A0
movetosheet "Sheet2"
let A0 = 11
goto A0

The bug only shows interactively: echo -e 'let A0=99\nmovetosheet "Sheet1"\nrecalc\n getnum A0'| sc-im t6.sc --quit_afterload --nocurses' returns the correct answer with no error.

PR #904