[Vala] Code generation error



Hi, think I found a bug in vala.

xc.playback_current_id().notifier_set((res, u) => {
  int id;
  res.get_int(out id);
  stdout.printf("%d\n", id);
});

Just tried out lambda for the first time. It will generate:

xmmsc_result_notifier_set ((_tmp1 = xmmsc_playback_current_id (xc)),
((xmmsc_result_notifier_t) __lambda0), NULL);

But _tmp1 will be declared in __lambda0 function and not in the
function it's used.

-- 
Daniel Svensson, <dsvensson gmail com>



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]