diff options
author | Simon Werbeck <simon.werbeck@gmail.com> | 2016-02-26 00:28:11 +0100 |
---|---|---|
committer | Rico Tzschichholz <ricotz@ubuntu.com> | 2016-10-05 08:21:46 +0200 |
commit | 566ff81b821775c6e178c8c90bcac95d08436c91 (patch) | |
tree | de774c05ed0f5602d5ca5bb0e123a7f405e7d309 /tests | |
parent | e7f987ab5da3bf618776572755570323d57bd9de (diff) | |
download | vala-566ff81b821775c6e178c8c90bcac95d08436c91.tar.gz |
codegen: Fix array length of array returned by lambda
This ensures that the right default values are used for missing ccode
attributes.
https://bugzilla.gnome.org/show_bug.cgi?id=761360
Diffstat (limited to 'tests')
-rw-r--r-- | tests/Makefile.am | 1 | ||||
-rw-r--r-- | tests/delegates/bug761360.vala | 8 |
2 files changed, 9 insertions, 0 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am index 941e0184b..7f46a2b0b 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -129,6 +129,7 @@ TESTS = \ delegates/bug639751.vala \ delegates/bug659778.vala \ delegates/bug703804.vala \ + delegates/bug761360.vala \ objects/chainup.vala \ objects/classes.vala \ objects/generics.vala \ diff --git a/tests/delegates/bug761360.vala b/tests/delegates/bug761360.vala new file mode 100644 index 000000000..ba90b69b6 --- /dev/null +++ b/tests/delegates/bug761360.vala @@ -0,0 +1,8 @@ +delegate int[] ArrayReturnFunc (); + +void main () { + ArrayReturnFunc f = () => { return {1, 2, 3}; }; + + var a = f (); + assert (a.length == 3); +} |