[vala] codegen: allow "type" property if it's NoAccessorMethod
- From: Luca Bruno <lucabru src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala] codegen: allow "type" property if it's NoAccessorMethod
- Date: Wed, 24 Dec 2014 18:03:48 +0000 (UTC)
commit 46f7f2c8d40aa6b4e689534a6a65421a38f1105b
Author: Luca Bruno <lucabru src gnome org>
Date: Wed Dec 24 01:25:09 2014 +0100
codegen: allow "type" property if it's NoAccessorMethod
Fixes bug 741862
codegen/valagtypemodule.vala | 11 ++++++++++-
1 files changed, 10 insertions(+), 1 deletions(-)
---
diff --git a/codegen/valagtypemodule.vala b/codegen/valagtypemodule.vala
index b25cec4..f4d3ea2 100644
--- a/codegen/valagtypemodule.vala
+++ b/codegen/valagtypemodule.vala
@@ -2204,7 +2204,16 @@ public class Vala.GTypeModule : GErrorModule {
public override void visit_property (Property prop) {
var cl = current_type_symbol as Class;
var st = current_type_symbol as Struct;
- if (prop.name == "type" && ((cl != null && !cl.is_compact) || (st != null &&
get_ccode_has_type_id (st)))) {
+
+ var base_prop = prop;
+ if (prop.base_property != null) {
+ base_prop = prop.base_property;
+ } else if (prop.base_interface_property != null) {
+ base_prop = prop.base_interface_property;
+ }
+
+ if (base_prop.get_attribute ("NoAccessorMethod") == null &&
+ prop.name == "type" && ((cl != null && !cl.is_compact) || (st != null &&
get_ccode_has_type_id (st)))) {
Report.error (prop.source_reference, "Property 'type' not allowed");
return;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]