[vala/0.46] 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.46] vala: Don't issue a warning for non-public struct fields in bindings
- Date: Sat, 5 Oct 2019 12:10:07 +0000 (UTC)
commit eb125e434866462439dd330d69c30ec0ca6a0997
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 754d50cb5..83885b235 100644
--- a/vala/valaparser.vala
+++ b/vala/valaparser.vala
@@ -2670,7 +2670,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]