]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
tests: Extend "struct with delegate" test to increase coverage
authorRico Tzschichholz <ricotz@ubuntu.com>
Sun, 10 Mar 2019 17:14:09 +0000 (18:14 +0100)
committerRico Tzschichholz <ricotz@ubuntu.com>
Wed, 10 Apr 2019 14:10:10 +0000 (16:10 +0200)
tests/structs/structs.vala

index ae4e6f7341791ed1eebc03f1262c98f2f80dea92..dabe021d8be36851cb83f0bf8a93de972c2bacdb 100644 (file)
@@ -29,9 +29,10 @@ struct StructWithNamedCreationMethod {
 delegate void Func ();
 
 struct StructWithFunc {
-       int foo;
+       public Func foo;
 
-       public StructWithFunc (Func f) {
+       public StructWithFunc (owned Func f) {
+               foo = (owned) f;
        }
 }