[vala] Report error when using `construct' with incompatible properties
- From: Jürg Billeter <juergbi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala] Report error when using `construct' with incompatible properties
- Date: Sat, 20 Mar 2010 22:04:16 +0000 (UTC)
commit f28bcc831175368e051af6ed34cf22e96ec43653
Author: Jürg Billeter <j bitron ch>
Date: Sat Mar 20 23:02:51 2010 +0100
Report error when using `construct' with incompatible properties
Fixes bug 574146.
codegen/valaccodebasemodule.vala | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/codegen/valaccodebasemodule.vala b/codegen/valaccodebasemodule.vala
index 4eecd38..f134d79 100644
--- a/codegen/valaccodebasemodule.vala
+++ b/codegen/valaccodebasemodule.vala
@@ -1452,6 +1452,10 @@ internal class Vala.CCodeBaseModule : CCodeModule {
Report.error (acc.source_reference, "construct properties require GLib.Object");
acc.error = true;
return;
+ } else if (acc.construction && !is_gobject_property (prop)) {
+ Report.error (acc.source_reference, "construct properties not supported for specified property type");
+ acc.error = true;
+ return;
}
// do not declare overriding properties and interface implementations
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]