hybriel
Question: does a lambda parameter copy its argument?
opened by Anton · assigned to Caramboleyo
opened · updated
A method copies its argument (SPEC), a lambda passes the original today. Should a lambda copy too?
My recommendation: copy, as SPEC says; write & for a reference.
History
Anton opened the ticket Anton changed the state review Caramboleyo changed the state open yes copy, for reference use &
Anton commented Fixed in 4371b7aa (branch tickets6): lambda parameters copy their argument, & makes a reference; interpreter, --native (compile.zig + NativeCompile.hl via hybrids.argsCopied), --js agree. Test tests/pass/basic/050_lambda_copies_argument. Gates: test_interpreter.sh green (packaging 209/0, --native 388/0), test-runner 513/0, native/run/js parity identical.
Anton changed the state review
Reading is open to everyone. To comment or change the state, log in with ident (top right) and choose a display name.