mirror of
https://github.com/odoo/owl.git
synced 2025-10-06 19:59:41 +07:00
[IMP] compiler: scope generated ids to their prefix
This means that unrelated ids (eg the id of a template, variable or key) not longer share the same incrementing counter, meaning that you no longer see a variable named "v2" unless another variable "v1" was generated previously, this is also true for block data.
This commit is contained in:
committed by
Géry Debongnie
parent
e8b0f31da6
commit
34b781aeed
@@ -50,8 +50,8 @@ exports[`t-on t-on expression in t-foreach 1`] = `
|
||||
let txt2 = ctx['val']+'';
|
||||
const v1 = ctx['otherState'];
|
||||
const v2 = ctx['val'];
|
||||
let hdlr3 = [()=>v1.vals.push(v2), ctx];
|
||||
c_block2[i1] = withKey(block3([txt1, txt2, hdlr3]), key1);
|
||||
let hdlr1 = [()=>v1.vals.push(v2), ctx];
|
||||
c_block2[i1] = withKey(block3([txt1, txt2, hdlr1]), key1);
|
||||
}
|
||||
let b2 = list(c_block2);
|
||||
return block1([], [b2]);
|
||||
@@ -84,8 +84,8 @@ exports[`t-on t-on expression in t-foreach with t-set 1`] = `
|
||||
const v1 = ctx['otherState'];
|
||||
const v2 = ctx['val'];
|
||||
const v3 = ctx['bossa'];
|
||||
let hdlr3 = [()=>v1.vals.push(v2+'_'+v3), ctx];
|
||||
c_block2[i1] = withKey(block3([txt1, txt2, hdlr3]), key1);
|
||||
let hdlr1 = [()=>v1.vals.push(v2+'_'+v3), ctx];
|
||||
c_block2[i1] = withKey(block3([txt1, txt2, hdlr1]), key1);
|
||||
}
|
||||
let b2 = list(c_block2);
|
||||
return block1([], [b2]);
|
||||
@@ -112,8 +112,8 @@ exports[`t-on t-on method call in t-foreach 1`] = `
|
||||
let txt1 = ctx['val_index'];
|
||||
let txt2 = ctx['val']+'';
|
||||
const v1 = ctx['val'];
|
||||
let hdlr3 = [()=>this.addVal(v1), ctx];
|
||||
c_block2[i1] = withKey(block3([txt1, txt2, hdlr3]), key1);
|
||||
let hdlr1 = [()=>this.addVal(v1), ctx];
|
||||
c_block2[i1] = withKey(block3([txt1, txt2, hdlr1]), key1);
|
||||
}
|
||||
let b2 = list(c_block2);
|
||||
return block1([], [b2]);
|
||||
|
||||
Reference in New Issue
Block a user