}
// 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;
}
// 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 ());
}
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;
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;
}
// 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;
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;
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;
}
// 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;
}
// 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 ());
}
}
// 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 ());
}
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;
}
// 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 ());
}