]> git.ipfire.org Git - thirdparty/vala.git/commit
Add native support to specify non default length-type for arrays
authorRico Tzschichholz <ricotz@ubuntu.com>
Thu, 15 Apr 2021 14:49:14 +0000 (16:49 +0200)
committerRico Tzschichholz <ricotz@ubuntu.com>
Tue, 4 Jan 2022 15:27:14 +0000 (16:27 +0100)
commita24f44294041cc87dd3cadab38e3caa919f774e0
treed184b7382ce311dffaa19795720c17111d28a82c
parentd74400bfaae61a1e2c246382e627b0a9adf8c304
Add native support to specify non default length-type for arrays

    string[:long] foo = new string[:long] { "foo" };

This applies to generated bindings where this new syntax will be
picked up. It will apply a stricter variable type checking for
such array types.

Fixes https://gitlab.gnome.org/GNOME/vala/issues/607
tests/Makefile.am
tests/arrays/length-type.c-expected [new file with mode: 0644]
tests/arrays/length-type.vala [new file with mode: 0644]
tests/parser/array-length.c-expected [new file with mode: 0644]
tests/parser/array-length.vala [new file with mode: 0644]
tests/semantic/array-length-invalid.test [new file with mode: 0644]
tests/semantic/array-length-nullable.test [new file with mode: 0644]
vala/valaarraycreationexpression.vala
vala/valaarraytype.vala
vala/valacodewriter.vala
vala/valaparser.vala