]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
vala: Replace and drop UnaryExpression.find_member_access()
authorRico Tzschichholz <ricotz@ubuntu.com>
Sat, 23 Oct 2021 13:27:12 +0000 (15:27 +0200)
committerRico Tzschichholz <ricotz@ubuntu.com>
Sun, 24 Oct 2021 12:19:11 +0000 (14:19 +0200)
vala/valaunaryexpression.vala

index 80bee55403ef85b44bd4937cc8aba18341c108d8..a725456fa4bbdc195622e3a052787e76fffe9e61 100644 (file)
@@ -128,14 +128,6 @@ public class Vala.UnaryExpression : Expression {
                return st.is_integer_type ();
        }
 
-       MemberAccess? find_member_access (Expression expr) {
-               if (expr is MemberAccess) {
-                       return (MemberAccess) expr;
-               }
-
-               return null;
-       }
-
        public override void get_error_types (Collection<DataType> collection, SourceReference? source_reference = null) {
                inner.get_error_types (collection, source_reference);
        }
@@ -211,8 +203,7 @@ public class Vala.UnaryExpression : Expression {
                                return false;
                        }
 
-                       var ma = find_member_access (inner);
-                       if (ma == null) {
+                       if (!(inner is MemberAccess)) {
                                error = true;
                                Report.error (source_reference, "Prefix operators not supported for this expression");
                                return false;