[vala/staging] vala: Drop SemanticAnalyzer.is_type_accessible()
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/staging] vala: Drop SemanticAnalyzer.is_type_accessible()
- Date: Sat, 6 Nov 2021 17:56:13 +0000 (UTC)
commit f67a8165dfff4d33a92dc542f9cc47d013cb1f04
Author: Rico Tzschichholz <ricotz ubuntu com>
Date: Sat Nov 6 18:55:37 2021 +0100
vala: Drop SemanticAnalyzer.is_type_accessible()
vala/valaclass.vala | 2 +-
vala/valaconstant.vala | 2 +-
vala/valacreationmethod.vala | 2 +-
vala/valadelegate.vala | 2 +-
vala/valafield.vala | 2 +-
vala/valainterface.vala | 2 +-
vala/valamethod.vala | 4 ++--
vala/valaparameter.vala | 2 +-
vala/valaproperty.vala | 2 +-
vala/valasemanticanalyzer.vala | 5 -----
vala/valastruct.vala | 2 +-
11 files changed, 11 insertions(+), 16 deletions(-)
---
diff --git a/vala/valaclass.vala b/vala/valaclass.vala
index a6f5ae633..436a6b3cf 100644
--- a/vala/valaclass.vala
+++ b/vala/valaclass.vala
@@ -553,7 +553,7 @@ public class Vala.Class : ObjectTypeSymbol {
}
// check whether base type is at least as accessible as the class
- if (!context.analyzer.is_type_accessible (this, base_type_reference)) {
+ if (!base_type_reference.is_accessible (this)) {
error = true;
Report.error (source_reference, "base type `%s' is less accessible than class
`%s'", base_type_reference.to_string (), get_full_name ());
return false;
diff --git a/vala/valaconstant.vala b/vala/valaconstant.vala
index 8b5f9ea88..868d8e46b 100644
--- a/vala/valaconstant.vala
+++ b/vala/valaconstant.vala
@@ -122,7 +122,7 @@ public class Vala.Constant : Symbol {
}
// check whether constant type is at least as accessible as the constant
- if (!context.analyzer.is_type_accessible (this, type_reference)) {
+ if (!type_reference.is_accessible (this)) {
error = true;
Report.error (source_reference, "constant type `%s' is less accessible than constant
`%s'", type_reference.to_string (), get_full_name ());
return false;
diff --git a/vala/valacreationmethod.vala b/vala/valacreationmethod.vala
index 77b311f31..45adef65f 100644
--- a/vala/valacreationmethod.vala
+++ b/vala/valacreationmethod.vala
@@ -147,7 +147,7 @@ public class Vala.CreationMethod : Method {
error_type.check (context);
// check whether error type is at least as accessible as the creation method
- if (!context.analyzer.is_type_accessible (this, error_type)) {
+ if (!error_type.is_accessible (this)) {
error = true;
Report.error (source_reference, "error type `%s' is less accessible
than creation method `%s'", error_type.to_string (), get_full_name ());
return false;
diff --git a/vala/valadelegate.vala b/vala/valadelegate.vala
index 249adcdfc..eeaabcb69 100644
--- a/vala/valadelegate.vala
+++ b/vala/valadelegate.vala
@@ -341,7 +341,7 @@ public class Vala.Delegate : TypeSymbol, Callable {
error_type.check (context);
// check whether error type is at least as accessible as the delegate
- if (!context.analyzer.is_type_accessible (this, error_type)) {
+ if (!error_type.is_accessible (this)) {
error = true;
Report.error (source_reference, "error type `%s' is less accessible
than delegate `%s'", error_type.to_string (), get_full_name ());
return false;
diff --git a/vala/valafield.vala b/vala/valafield.vala
index 731249e71..566a68b12 100644
--- a/vala/valafield.vala
+++ b/vala/valafield.vala
@@ -120,7 +120,7 @@ public class Vala.Field : Variable, Lockable {
}
// check whether field type is at least as accessible as the field
- if (!context.analyzer.is_type_accessible (this, variable_type)) {
+ if (!variable_type.is_accessible (this)) {
error = true;
Report.error (source_reference, "field type `%s' is less accessible than field `%s'",
variable_type.to_string (), get_full_name ());
return false;
diff --git a/vala/valainterface.vala b/vala/valainterface.vala
index d3d8733d0..92e5da154 100644
--- a/vala/valainterface.vala
+++ b/vala/valainterface.vala
@@ -172,7 +172,7 @@ public class Vala.Interface : ObjectTypeSymbol {
foreach (DataType prerequisite_reference in get_prerequisites ()) {
// check whether prerequisite is at least as accessible as the interface
- if (!context.analyzer.is_type_accessible (this, prerequisite_reference)) {
+ if (!prerequisite_reference.is_accessible (this)) {
error = true;
Report.error (source_reference, "prerequisite `%s' is less accessible than
interface `%s'", prerequisite_reference.to_string (), get_full_name ());
return false;
diff --git a/vala/valamethod.vala b/vala/valamethod.vala
index dc41e3d77..f3617c4bd 100644
--- a/vala/valamethod.vala
+++ b/vala/valamethod.vala
@@ -931,7 +931,7 @@ public class Vala.Method : Subroutine, Callable {
error_type.check (context);
// check whether error type is at least as accessible as the method
- if (!context.analyzer.is_type_accessible (this, error_type)) {
+ if (!error_type.is_accessible (this)) {
error = true;
Report.error (source_reference, "error type `%s' is less accessible
than method `%s'", error_type.to_string (), get_full_name ());
return false;
@@ -998,7 +998,7 @@ public class Vala.Method : Subroutine, Callable {
}
// check whether return type is at least as accessible as the method
- if (!context.analyzer.is_type_accessible (this, return_type)) {
+ if (!return_type.is_accessible (this)) {
error = true;
Report.error (source_reference, "return type `%s' is less accessible than method
`%s'", return_type.to_string (), get_full_name ());
return false;
diff --git a/vala/valaparameter.vala b/vala/valaparameter.vala
index 7bbb2cedb..656188848 100644
--- a/vala/valaparameter.vala
+++ b/vala/valaparameter.vala
@@ -216,7 +216,7 @@ public class Vala.Parameter : Variable {
}
// check whether parameter type is at least as accessible as the method
- if (!context.analyzer.is_type_accessible (this, variable_type)) {
+ if (!variable_type.is_accessible (this)) {
error = true;
Report.error (source_reference, "parameter type `%s' is less accessible than
method `%s'", variable_type.to_string (), parent_symbol.get_full_name ());
}
diff --git a/vala/valaproperty.vala b/vala/valaproperty.vala
index 6f04ff97d..fac24d53d 100644
--- a/vala/valaproperty.vala
+++ b/vala/valaproperty.vala
@@ -520,7 +520,7 @@ public class Vala.Property : Symbol, Lockable {
}
// check whether property type is at least as accessible as the property
- if (!context.analyzer.is_type_accessible (this, property_type)) {
+ if (!property_type.is_accessible (this)) {
error = true;
Report.error (source_reference, "property type `%s' is less accessible than property
`%s'", property_type.to_string (), get_full_name ());
}
diff --git a/vala/valasemanticanalyzer.vala b/vala/valasemanticanalyzer.vala
index 7f2e56c03..b49a8299d 100644
--- a/vala/valasemanticanalyzer.vala
+++ b/vala/valasemanticanalyzer.vala
@@ -263,11 +263,6 @@ public class Vala.SemanticAnalyzer : CodeVisitor {
file.check (context);
}
- // check whether type is at least as accessible as the specified symbol
- public bool is_type_accessible (Symbol sym, DataType type) {
- return type.is_accessible (sym);
- }
-
public DataType? get_value_type_for_symbol (Symbol sym, bool lvalue) {
if (sym is Field) {
unowned Field f = (Field) sym;
diff --git a/vala/valastruct.vala b/vala/valastruct.vala
index c7e6d335c..d44be4021 100644
--- a/vala/valastruct.vala
+++ b/vala/valastruct.vala
@@ -512,7 +512,7 @@ public class Vala.Struct : TypeSymbol {
}
// check whether base type is at least as accessible as the struct
- if (!context.analyzer.is_type_accessible (this, base_type)) {
+ if (!base_type.is_accessible (this)) {
error = true;
Report.error (source_reference, "base type `%s' is less accessible than
struct `%s'", base_type.to_string (), get_full_name ());
return false;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]