GNOME Bugzilla – Bug 637714
Foreach element variable not captured using lambda function
Last modified: 2011-01-04 09:08:47 UTC
Simple Code: public static void main(){ string f = "abc def"; try{ foreach(var s in f.split(" ")){ message("%s", s); unowned Thread t = Thread.create(()=>{ message("%s", s); return null; }, true); t.join(); } }catch(Error e){ } } ======================================================= In both message, it showed 'null'. valac --version Vala 0.10.1
*** This bug has been marked as a duplicate of bug 628336 ***