mirror of https://github.com/arendst/Tasmota.git
Merge branch 'development' of https://github.com/arendst/Tasmota into development
This commit is contained in:
commit
ad595a6537
|
@ -317,7 +317,7 @@ static void free_suffix(bfuncinfo *finfo, bexpdesc *e)
|
|||
be_code_freeregs(finfo, 1);
|
||||
}
|
||||
/* release object register */
|
||||
if (e->v.ss.tt == ETREG && (int)e->v.ss.obj >= nlocal) {
|
||||
if (e->v.ss.tt == ETREG && (int)e->v.ss.obj >= nlocal && (e->v.ss.obj + 1 >= finfo->freereg)) {
|
||||
be_code_freeregs(finfo, 1);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -9,3 +9,20 @@ var pairs = {
|
|||
for i : 0 .. keys.size() - 1
|
||||
assert(pairs[keys[i]] == 'value' .. i + 1)
|
||||
end
|
||||
|
||||
#- test cases related to #101 -#
|
||||
class C var l end
|
||||
c=C()
|
||||
c.l=[0,1,2]
|
||||
|
||||
def t_101_nok_1() return c.l[0..1] end
|
||||
def t_101_ok_1() var l2 = c.l return l2[0..1] end
|
||||
|
||||
t_i = 0
|
||||
def t_101_nok_2() return c.l[t_i] end
|
||||
def t_101_ok_2() return c.l[0] end
|
||||
|
||||
assert(t_101_nok_1() == [0, 1])
|
||||
assert(t_101_ok_1() == [0, 1])
|
||||
assert(t_101_nok_2() == 0)
|
||||
assert(t_101_ok_2() == 0)
|
||||
|
|
Loading…
Reference in New Issue