diff options
author | Rico Tzschichholz <ricotz@ubuntu.com> | 2018-10-31 15:27:36 +0100 |
---|---|---|
committer | Rico Tzschichholz <ricotz@ubuntu.com> | 2018-10-31 15:27:36 +0100 |
commit | b85093705878261f7c916f0db713d2783c23e64e (patch) | |
tree | 1e6ae7930bca0800d14111c9ed37b0e9053ef5c1 /vala | |
parent | 121c89e82e376dbed0959ef9e961ee4fd8bc8a4b (diff) | |
download | vala-b85093705878261f7c916f0db713d2783c23e64e.tar.gz |
vala: Drop DataType.is_array() and use usual type check as anywhere else
Diffstat (limited to 'vala')
-rw-r--r-- | vala/valaarraytype.vala | 4 | ||||
-rw-r--r-- | vala/valadatatype.vala | 4 | ||||
-rw-r--r-- | vala/valaforeachstatement.vala | 2 |
3 files changed, 1 insertions, 9 deletions
diff --git a/vala/valaarraytype.vala b/vala/valaarraytype.vala index c1d4d7f29..e6987f043 100644 --- a/vala/valaarraytype.vala +++ b/vala/valaarraytype.vala @@ -176,10 +176,6 @@ public class Vala.ArrayType : ReferenceType { return result; } - public override bool is_array () { - return true; - } - public override string to_qualified_string (Scope? scope) { var elem_str = element_type.to_qualified_string (scope); if (element_type.is_weak () && !(parent_node is Constant)) { diff --git a/vala/valadatatype.vala b/vala/valadatatype.vala index 6d4876344..ce8a49610 100644 --- a/vala/valadatatype.vala +++ b/vala/valadatatype.vala @@ -378,10 +378,6 @@ public abstract class Vala.DataType : CodeNode { this is GenericType; } - public virtual bool is_array () { - return false; - } - // check whether this type is at least as accessible as the specified symbol public virtual bool is_accessible (Symbol sym) { foreach (var type_arg in get_type_arguments ()) { diff --git a/vala/valaforeachstatement.vala b/vala/valaforeachstatement.vala index d0e35485d..67063bbe1 100644 --- a/vala/valaforeachstatement.vala +++ b/vala/valaforeachstatement.vala @@ -168,7 +168,7 @@ public class Vala.ForeachStatement : Block { var collection_type = collection.value_type.copy (); collection.target_type = collection_type.copy (); - if (collection_type.is_array ()) { + if (collection_type is ArrayType) { var array_type = (ArrayType) collection_type; // can't use inline-allocated array for temporary variable |