diff options
author | Jürg Billeter <j@bitron.ch> | 2009-09-17 18:32:34 +0200 |
---|---|---|
committer | Jürg Billeter <j@bitron.ch> | 2009-09-17 18:32:34 +0200 |
commit | 873e330917ecced15684491a511c38b45baf761f (patch) | |
tree | 9b66325fc29ea8cbd0394c9f0ac30cb62372360b /vala/valalambdaexpression.vala | |
parent | a59d540b293051cef07a59bc9c92e79435c78eaa (diff) | |
download | vala-873e330917ecced15684491a511c38b45baf761f.tar.gz |
Report error when capturing uninitialized variables in closures
Diffstat (limited to 'vala/valalambdaexpression.vala')
-rw-r--r-- | vala/valalambdaexpression.vala | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/vala/valalambdaexpression.vala b/vala/valalambdaexpression.vala index b7bb1f3c5..16a51c1c3 100644 --- a/vala/valalambdaexpression.vala +++ b/vala/valalambdaexpression.vala @@ -226,4 +226,11 @@ public class Vala.LambdaExpression : Expression { return !error; } + + public override void get_used_variables (Collection<LocalVariable> collection) { + // require captured variables to be initialized + if (method.closure) { + method.get_captured_variables (collection); + } + } } |