[vala/0.40] vala: Don't issue a warning for non-public struct fields in bindings
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/0.40] vala: Don't issue a warning for non-public struct fields in bindings
- Date: Wed, 9 Oct 2019 17:35:51 +0000 (UTC)
commit 8564c185059c165c338206d510c9902770e27e8a
Author: Rico Tzschichholz <ricotz ubuntu com>
Date: Sat Oct 5 12:18:19 2019 +0200
vala: Don't issue a warning for non-public struct fields in bindings
vala/valaparser.vala | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/vala/valaparser.vala b/vala/valaparser.vala
index 55342485f..6abe6eb82 100644
--- a/vala/valaparser.vala
+++ b/vala/valaparser.vala
@@ -2663,7 +2663,8 @@ public class Vala.Parser : CodeVisitor {
f.binding = MemberBinding.CLASS;
}
- if (parent is Struct && f.access != SymbolAccessibility.PUBLIC && f.binding ==
MemberBinding.INSTANCE) {
+ if (!parent.external_package && parent is Struct
+ && f.access != SymbolAccessibility.PUBLIC && f.binding == MemberBinding.INSTANCE) {
Report.warning (f.source_reference, "accessibility of struct fields can only be
`public`");
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]