[Vala] feature request + proposed patch: infer enum scope from expected type
- From: Timo Kluck <tkluck infty nl>
- To: vala-list gnome org
- Subject: [Vala] feature request + proposed patch: infer enum scope from expected type
- Date: Tue, 13 Dec 2011 00:18:39 +0100
Dear vala-developers,
I thought it would be nice if it was possible to write:
A.bind_property("prop", B, "prop", SYNC_CREATE|BIDIRECTIONAL);
and not having to specify the scope GLib.BindingFlags:
A.bind_property("prop", B, "prop",
GLib.BindingFlags.SYNC_CREATE|GLib.BindingFlags.BIDIRECTIONAL);
I have written a small patch taking care of that, and posted it at
bugzilla [1]. There's a .vala file with testcases too.
The case of a single enumeration value is a very minor change: it only
affects code that used to give a compiler error. However, the case of
flags has to change the way that the operators | and & use their
target value. I cannot really oversee whether this will give new
problems.
I'd love to hear your feedback!
Best regards,
Timo Kluck
( I sent this from the wrong e-mail address earlier, so it got held.
I'm resending it from the e-mail address that's subscribed to the list
)
[1] https://bugzilla.gnome.org/show_bug.cgi?id=666035
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]