[vala/staging] girparser: Don't accept methods as property-accessor which throw errors
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/staging] girparser: Don't accept methods as property-accessor which throw errors
- Date: Mon, 29 Jan 2018 20:30:59 +0000 (UTC)
commit ff8a6d15f420a0d78c52720990ff8faf68e489f7
Author: Rico Tzschichholz <ricotz ubuntu com>
Date: Mon Jan 29 17:38:19 2018 +0100
girparser: Don't accept methods as property-accessor which throw errors
This should be considered a temporary fix.
https://bugzilla.gnome.org/show_bug.cgi?id=792998
vala/valagirparser.vala | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/vala/valagirparser.vala b/vala/valagirparser.vala
index 617aaf0..65ab2d9 100644
--- a/vala/valagirparser.vala
+++ b/vala/valagirparser.vala
@@ -1005,7 +1005,7 @@ public class Vala.GirParser : CodeVisitor {
// ensure getter vfunc if the property is abstract
if (m != null) {
getter.process (parser);
- if (m.return_type is VoidType ||
m.get_parameters().size != 0) {
+ if (m.return_type is VoidType ||
m.get_parameters().size != 0 || m.get_error_types ().size > 0) {
prop.set_attribute ("NoAccessorMethod", true);
} else {
if (getter.name == name) {
@@ -1032,7 +1032,7 @@ public class Vala.GirParser : CodeVisitor {
// ensure setter vfunc if the property is abstract
if (m != null) {
setter.process (parser);
- if (!(m.return_type is VoidType || m.return_type is
BooleanType) || m.get_parameters().size != 1) {
+ if (!(m.return_type is VoidType || m.return_type is
BooleanType) || m.get_parameters ().size != 1 || m.get_error_types ().size > 0) {
prop.set_attribute ("NoAccessorMethod", true);
prop.set_attribute ("ConcreteAccessor",
false);
} else {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]