Revisiting a slice expression results in wrong length
When a slice expression, used in a vapi, is emitted more than once, its assigned length is wrong.
valac -C test1.vala test2.vala --vapidir . --pkg test
// test1.vala
void foo () {
manam ({});
}
void main () {
}
// test2.vala
void bar () {
manam ({});
}
// test.vapi
public void manam (string[] a) {
var b = a[1:];
}
The second emission results in _tmp0__length1 = _tmp0__length1;
for assigning the new slice length instead of _tmp0__length1 = a_length1 - 1;
Edited by Rico Tzschichholz