v icon indicating copy to clipboard operation
v copied to clipboard

autofree mangling string parsing chain

Open mcastorina opened this issue 4 years ago • 1 comments

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 ")")

mcastorina avatar Mar 02 '21 15:03 mcastorina

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
=================================================================

JalonSolov avatar Jun 01 '25 20:06 JalonSolov