GNOME Bugzilla – Bug 678617
Does not pass const variables to lambda
Last modified: 2018-05-22 14:27:05 UTC
The following code build in valac but not in gcc: const uint AUTO_SCROLL_PITCH = 10; Timeout.add (10, () => { print ("timeout %d\n", AUTO_SCROLL_PITCH); return false; }); egg-list-box.c:3229:46: error: 'AUTO_SCROLL_PITCH' undeclared (first use in this function) Removing the 'const' fixes the issue.
commit d72b93c136b6fcc1dfa2cba10e45e676edfe0cc9 Author: Jürg Billeter <j@bitron.ch> Date: Sun Jun 24 17:02:01 2012 +0200 Report error when accessing constants of outer methods This is planned to be supported. https://bugzilla.gnome.org/show_bug.cgi?id=678617
*** Bug 669786 has been marked as a duplicate of this bug. ***
*** Bug 649564 has been marked as a duplicate of this bug. ***
-- 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/308.