LytixDev / slash

The Slash Scripting Language
GNU General Public License v3.0
7 stars 0 forks source link

fix sequence variable assignment inside loop bug #84

Closed LytixDev closed 6 months ago

LytixDev commented 6 months ago
var a = 0
var b = 1
var n = 10
loop _ in 2..$n+1 {
    var c = $a + $b
    $a, $b = $b, $c
}

The values of $a and $b will always be 0 and 1. They should incrementally increase, but they don't...

Could be an issue related to how the scope is updated during each iteration of the loop.