__ARGS__ broken in recent Pike master
Pike developers mailinglist/LysLysKOM 26044077:
26047339 2023-10-30 00:48 /21 rader/ Chris Angelico <rosuav@gmail.com>
Sänt av: SRS0=Zs/b=GL=lists.lysator.liu.se=pike-devel-bounces@lysator.liu.se
Importerad: 2023-10-30 00:48 av Brevbäraren
Extern mottagare: Pike Developers <pike-devel@lists.lysator.liu.se>
Mottagare: Pike (-) developers forum <21435>
Ärende: Pike 9.0 quirk with implicit lambda
void call(function cb) {cb(42);}
int main() {
werror("Pike version %O:\n", __VERSION__);
call() {
werror("Args: %O\n", __ARGS__);
mixed value = 1234;
werror("%O\n", lambda() {werror("%O\n", value);});
};
return 0;
}
In Pike 8 (tested on 8.1.15), the implicit lambda correctly receives
its __ARGS__
, and will happily provide those as closure variables. In
Pike 9 (tested with current master, 235eb5), the inner function
somehow causes __ARGS__
to be 0 instead of an array.
Any ideas as to what's going on here? Am I misusing implicit lambdas?
ChrisA
(26047339) /Chris Angelico <rosuav@gmail.com>/------