[vala/0.36] Mark defined constructors of abstract classes as protected



commit b4ce99bb1a7627572f4814d855e55f1a167991d0
Author: Rico Tzschichholz <ricotz ubuntu com>
Date:   Tue Mar 12 10:06:11 2019 +0100

    Mark defined constructors of abstract classes as protected

 codegen/valaccodebasemodule.vala  | 2 +-
 tests/asynchronous/generator.vala | 2 +-
 tests/chainup/bug791785.vala      | 2 +-
 vala/valaobjecttypesymbol.vala    | 2 +-
 vala/valasymbol.vala              | 2 +-
 vala/valatypesymbol.vala          | 2 +-
 vala/valavaluetype.vala           | 2 +-
 7 files changed, 7 insertions(+), 7 deletions(-)
---
diff --git a/codegen/valaccodebasemodule.vala b/codegen/valaccodebasemodule.vala
index 617849f59..1d0b416ae 100644
--- a/codegen/valaccodebasemodule.vala
+++ b/codegen/valaccodebasemodule.vala
@@ -352,7 +352,7 @@ public abstract class Vala.CCodeBaseModule : CodeGenerator {
 
        public static int ccode_attribute_cache_index = CodeNode.get_attribute_cache_index ();
 
-       public CCodeBaseModule () {
+       protected CCodeBaseModule () {
                predefined_marshal_set = new HashSet<string> (str_hash, str_equal);
                predefined_marshal_set.add ("VOID:VOID");
                predefined_marshal_set.add ("VOID:BOOLEAN");
diff --git a/tests/asynchronous/generator.vala b/tests/asynchronous/generator.vala
index f31e12a42..2c3654b56 100644
--- a/tests/asynchronous/generator.vala
+++ b/tests/asynchronous/generator.vala
@@ -7,7 +7,7 @@ abstract class Generator<G> {
        unowned G value;
        SourceFunc callback;
 
-       public Generator () {
+       protected Generator () {
                helper.begin ();
        }
 
diff --git a/tests/chainup/bug791785.vala b/tests/chainup/bug791785.vala
index eb46b0141..608de6b0e 100644
--- a/tests/chainup/bug791785.vala
+++ b/tests/chainup/bug791785.vala
@@ -5,7 +5,7 @@ struct Foo {
 abstract class AbstractBar {
        public Foo foo;
 
-       public AbstractBar (Foo foo) {
+       protected AbstractBar (Foo foo) {
                this.foo = foo;
        }
 }
diff --git a/vala/valaobjecttypesymbol.vala b/vala/valaobjecttypesymbol.vala
index 14fc230da..f254065c8 100644
--- a/vala/valaobjecttypesymbol.vala
+++ b/vala/valaobjecttypesymbol.vala
@@ -31,7 +31,7 @@
 public abstract class Vala.ObjectTypeSymbol : TypeSymbol {
        private List<TypeParameter> type_parameters = new ArrayList<TypeParameter> ();
 
-       public ObjectTypeSymbol (string name, SourceReference? source_reference = null, Comment? comment = 
null) {
+       protected ObjectTypeSymbol (string name, SourceReference? source_reference = null, Comment? comment = 
null) {
                base (name, source_reference, comment);
        }
 
diff --git a/vala/valasymbol.vala b/vala/valasymbol.vala
index c9f7d1e93..02755db76 100644
--- a/vala/valasymbol.vala
+++ b/vala/valasymbol.vala
@@ -192,7 +192,7 @@ public abstract class Vala.Symbol : CodeNode {
        private weak Scope _owner;
        private Scope _scope;
 
-       public Symbol (string? name, SourceReference? source_reference, Comment? comment = null) {
+       protected Symbol (string? name, SourceReference? source_reference, Comment? comment = null) {
                this.name = name;
                this.source_reference = source_reference;
                this.comment = comment;
diff --git a/vala/valatypesymbol.vala b/vala/valatypesymbol.vala
index 8ba3aef57..f84b53f5f 100644
--- a/vala/valatypesymbol.vala
+++ b/vala/valatypesymbol.vala
@@ -29,7 +29,7 @@ using GLib;
  * code or imported from an external library with a Vala API file.
  */
 public abstract class Vala.TypeSymbol : Symbol {
-       public TypeSymbol (string? name, SourceReference? source_reference = null, Comment? comment = null) {
+       protected TypeSymbol (string? name, SourceReference? source_reference = null, Comment? comment = 
null) {
                base (name, source_reference, comment);
        }
 
diff --git a/vala/valavaluetype.vala b/vala/valavaluetype.vala
index d78af9960..ed1225d6d 100644
--- a/vala/valavaluetype.vala
+++ b/vala/valavaluetype.vala
@@ -31,7 +31,7 @@ public abstract class Vala.ValueType : DataType {
         */
        public weak TypeSymbol type_symbol { get; set; }
 
-       public ValueType (TypeSymbol type_symbol) {
+       protected ValueType (TypeSymbol type_symbol) {
                this.type_symbol = type_symbol;
                data_type = type_symbol;
        }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]