[FIX] compiler: add _ prefix to local variables while compiling an expression

This commit is contained in:
Bruno Boi
2022-01-27 10:42:26 +01:00
committed by Samuel Degueldre
parent 4a971f2963
commit 3f575148b6
7 changed files with 15 additions and 12 deletions
@@ -105,7 +105,7 @@ exports[`event handling objects from scope are properly captured by t-on 1`] = `
let key1 = ctx['item'];
const v1 = ctx['onClick'];
const v2 = ctx['item'];
let hdlr1 = [ev=>v1(v2.val,ev), ctx];
let hdlr1 = [_ev=>v1(v2.val,_ev), ctx];
c_block2[i1] = withKey(block3([hdlr1]), key1);
}
let b2 = list(c_block2);
@@ -146,7 +146,7 @@ exports[`event handling t-on with handler bound to dynamic argument on a t-forea
let key1 = ctx['item'];
const v1 = ctx['onClick'];
const v2 = ctx['item'];
let hdlr1 = [ev=>v1(v2,ev), ctx];
let hdlr1 = [_ev=>v1(v2,_ev), ctx];
c_block2[i1] = withKey(block3([hdlr1]), key1);
}
let b2 = list(c_block2);