diff options
author | Ole André Vadla Ravnås <oleavr@gmail.com> | 2021-05-22 23:37:28 +0200 |
---|---|---|
committer | Rico Tzschichholz <ricotz@ubuntu.com> | 2021-05-22 23:48:02 +0200 |
commit | bf2f5c1ef74f4f242da35f25e28e1669964c8e97 (patch) | |
tree | bbeab2b7cb7aa19549c130ddb737b89117398657 /tests/objects/gsource.vala | |
parent | d1cb327977fb614f0064c567ad67b96b8c03f023 (diff) | |
download | vala-bf2f5c1ef74f4f242da35f25e28e1669964c8e97.tar.gz |
codegen: Fix support for public fields on GLib.Source subclasses
Diffstat (limited to 'tests/objects/gsource.vala')
-rw-r--r-- | tests/objects/gsource.vala | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/objects/gsource.vala b/tests/objects/gsource.vala index cb2543979..753d2c4d9 100644 --- a/tests/objects/gsource.vala +++ b/tests/objects/gsource.vala @@ -13,6 +13,28 @@ class FooSource : Source { } } +class BarSource : Source { + public int custom_timeout; + + public BarSource (int timeout) { + custom_timeout = timeout; + } + + public override bool prepare (out int timeout) { + timeout = custom_timeout; + return false; + } + + public override bool check () { + return false; + } + + public override bool dispatch (SourceFunc? callback) { + return false; + } +} + void main () { var foo = new FooSource (); + var bar = new BarSource (1000); } |