GNOME Bugzilla – Bug 746200
Capturing generics inside constructor
Last modified: 2018-05-22 15:22:09 UTC
Wrong code is generated when a generic variable is captured by a lambda expression when inside the constructor. Minimal test case: public class Test<G> : Object { public Test () { G a = null; SourceFunc f = () => { G b = a; // capture a return true; }; } static void main () { } }
All this thing needs a rewrite, can't follow the code anymore :S
So the main problem is that all the code used to generate the block_data_unref, is generated in the context of the constructor, not the lambda.
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/vala/issues/492.