v
v copied to clipboard
autofree mangling string parsing chain
V version: V 0.2.2 db9b523 OS: linux
What did you do?
lines := ['' 'a:b']
b := lines[1].split_nth(':', 2)[1].trim_left(' \t')
println(b)
v -autofree run poc.v
What did you expect to see?
b
What did you see instead? Builder error
/tmp/v/poc.3078367487648804103.tmp.c:9523: warning: implicit declaration of function 't'
/tmp/v/poc.3078367487648804103.tmp.c:9523: error: '{' expected (got ")")
With latest V 0.4.10 566d22a, there is still a problem, but the error message has changed:
================== C compilation error (from tcc): ==============
cc: /tmp/v_1000/x.01JWPKV78Q65QQBQTBKAN8SV8E.tmp.c:5638: error: 'af2' undeclared
=================================================================